以下命令可以直接復制:
1.查詢CPU信息
#cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
2.查看內(nèi)存信息
# cat /proc/meminfo
內(nèi)存信息是指運行內(nèi)存,并不是指磁盤大。
3.查看當前操作系統(tǒng)的內(nèi)核信息
# uname -a
4.查看機器型號(即主板)
# dmidecode | grep "Product Name"
5.查看網(wǎng)卡信息
# dmesg | grep -i eth
# lspci |grep -i eth
這兩個命令都可以查詢網(wǎng)卡信息,但如果打印信息不一致linux常用命令,請以# lspci |grep -i eth命令打印出來的信息為準
如圖可知,# dmesg | grep -i eth打印出來的為驅(qū)動信息,X722和XL710是兩種顯卡linux常用命令,但是驅(qū)動可以是相同的;
6.查看使用了幾個網(wǎng)卡
#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)
以上打印說明使用了兩個網(wǎng)卡