查看服务器信息linux,深入剖析Linux服务器信息,全面解析与实操指南
- 综合资讯
- 2024-11-19 05:04:53
- 2

深入解析Linux服务器信息,涵盖全面知识与实操指南。本文将探讨如何查看Linux服务器信息,并提供详细解析和实际操作步骤,助您掌握Linux服务器信息查看技巧。...
深入解析Linux服务器信息,涵盖全面知识与实操指南。本文将探讨如何查看Linux服务器信息,并提供详细解析和实际操作步骤,助您掌握Linux服务器信息查看技巧。
随着信息技术的飞速发展,Linux服务器已成为众多企业和个人用户的选择,了解Linux服务器信息,对于维护、优化及安全防护至关重要,本文将深入剖析Linux服务器信息,包括系统信息、硬件信息、网络信息、进程信息等,并提供实操指南,帮助您更好地管理和维护Linux服务器。
系统信息
1、查看系统版本
[root@linux ~]# cat /etc/os-release NAME="Ubuntu" VERSION="20.04.5 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.5 LTS" VERSION_ID="20.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=focal UBUNTU_CODENAME=focal
2、查看内核版本
[root@linux ~]# uname -r 5、4.0-42-generic
3、查看CPU信息
[root@linux ~]# cat /proc/cpuinfo processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 79 model name : Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz stepping : 4 microcode : 0x4000090 cpu MHz : 2399.000 BogoMIPS : 4780.00 cache size : 16384 KB fpu : yes fpu_exception : yes cpuid level : 20 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid apic base-timer tpr_shadow vnmi perfctr Lapic bogomips : 4780.00 clflush size : 64 cache_alignment : 64 address sizes : 46 bits physical, 48 bits virtual power management:
4、查看内存信息
[root@linux ~]# free -m total used free shared buff/cache available Mem: 16384 16012 272 0 272 2872 Swap: 0 0 0
5、查看磁盘空间占用
[root@linux ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/vda1 50G 47G 2.8G 96% / devtmpfs 1.9G 0 1.9G 0% /dev tmpfs 1.9G 0 1.9G 0% /run tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup tmpfs 1.9G 0 1.9G 0% /dev/shm tmpfs 1.9G 0 1.9G 0% /sys/fs/pstore tmpfs 1.9G 0 1.9G 0% /tmp
硬件信息
1、查看显卡信息
[root@linux ~]# lspci | grep -i 'vga' 02:00.0 VGA compatible controller: NVIDIA Corporation GF108M [Quadro 2000M] (rev a1)
2、查看网络设备信息
[root@linux ~]# ifconfig eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe80::a00:27ff:fe5c:9bff prefixlen 64 scopeid 0x20<link> ether 00:0c:29:5c:9b:ff txqueuelen 1000 (以太网) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 0 (本地回环) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
3、查看CPU架构
[root@linux ~]# arch x86_64
网络信息
1、查看路由表
[root@linux ~]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0、0.0.0 192.168.1.1 0.0.0.0 UG 100 0 0 eth0 169、254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0 192、168.1.0 0.0.0.0 255.255.255.0 U 100 0 0 eth0
2、查看端口占用情况
[root@linux ~]# netstat -tunlp | grep 80 tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 23679/nginx: master tcp 0 0 192.168.1.100:80 0.0.0.0:* LISTEN 23679/nginx: master
3、查看DNS解析
[root@linux ~]# nslookup www.baidu.com Server: 192.168.1.1 Address: 192.168.1.1#53 Non-authoritative answer: Name: www.a.shifen.com Address: 220.181.38.148
进程信息
1、查看当前进程
[root@linux ~]# ps aux USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 4236 732 ? Ss Jan30 0:00 /sbin/init root 2 0.0 0.0 4236 732 ? S Jan30 0:00 [kthreadd] root 3 0.0 0.0 4236 732 ? S Jan30 0:00 [ksoftirqd/0] root 5 0.0 0.0 4236 732 ? S Jan30 0:00 [kworker/0:0H] ...
2、查看特定进程
[root@linux ~]# ps -ef | grep nginx root 23679 1 0.0 27636 5848 ? Ss Jan30 0:00 nginx: master process /usr/local/nginx/sbin/nginx root 23680 1 0.0 27636 5848 ? Ss Jan30 0:00 nginx: worker process root 23681 1 0.0 27636 5848 ? Ss Jan30 0:00 nginx: worker process
本文详细介绍了Linux服务器信息的查看方法,包括系统信息、硬件信息、网络信息、进程信息等,通过掌握这些信息,可以帮助您更好地管理和维护Linux服务器,希望本文对您有所帮助。
本文由智淘云于2024-11-19发表在智淘云,如有疑问,请联系我们。
本文链接:https://www.zhitaoyun.cn/937757.html
本文链接:https://www.zhitaoyun.cn/937757.html
发表评论