以下命令可以直接复制:
1.查询CPU信息
#cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
2.查看内存信息
# cat /proc/meminfo
内存信息是指运行内存,并不是指磁盘大小;
3.查看当前操作系统的内核信息
# uname -a
4.查看机器型号(即主板)
# dmidecode | grep "Product Name"
5.查看网卡信息
# dmesg | grep -i eth
# lspci |grep -i eth
这两个命令都可以查询网卡信息,但如果打印信息不一致linux常用命令,请以# lspci |grep -i eth命令打印出来的信息为准
如图可知,# dmesg | grep -i eth打印出来的为驱动信息,X722和XL710是两种显卡linux常用命令,但是驱动可以是相同的;
6.查看使用了几个网卡
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:A4:5A:BF
inet addr:192.168.1.160 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fea4:5abf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1650 errors:0 dropped:0 overruns:0 frame:0
TX packets:112 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:134000 (130.8 KiB) TX bytes:12228 (11.9 KiB)
eth1 Link encap:Ethernet HWaddr 00:0C:29:A4:5A:C9
inet addr:192.168.1.161 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fea4:5ac9/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
rx packets:2924 errors:0 dropped:0 overruns:0 frame:0。 rx packets:2924 errors:0 dropped:0 overruns:0 frame:0。 rx packets:0 errors:0 dropped:0 overruns:0 frame:0。
TX packets:88 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:125909 (122.9 KiB) TX bytes:9320 (9.1 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
rx packets:144 errors:0 dropped:0 overruns:0 frame:0。 rx packets:891978 errors:0 dropped:0 overruns:0 frame:0。 rx packets:0 errors:0 dropped:0 overruns:0 frame:0。
TX packets:182 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:10340 (10.0 KiB) TX bytes:10340 (10.0 KiB)
以上打印说明使用了两个网卡