1 查看CPU服務器
1.1 查看CPU個數ide
# cat /proc/cpuinfo | grep "physical id" | uniq | wc -lui
2 uniq命令:刪除重複行;wc –l命令:統計行數**spa
1.2 查看CPU核數code
# cat /proc/cpuinfo | grep "cpu cores" | uniqorm
cpu cores : 4blog
1.3 查看CPU型號內存
# cat /proc/cpuinfo | grep 'model name' |uniqutf-8
model name : Intel(R) Xeon(R) CPU E5630 @ 2.53GHzci
總結:該服務器有2個4核CPU,型號Intel(R) Xeon(R) CPU E5630 @ 2.53GHz
2 查看內存
2.1 查看內存總數
#cat /proc/meminfo | grep MemTotal
MemTotal: 32941268 kB //內存32G
2.2 查看內存條數
本節內容引自新浪博文《Linux查看內存條數》
查看原文:
# dmidecode |grep -A16 "Memory Device$"
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: 2048 MB //1條2G內存
Form Factor: DIMM
Set: 1
Locator: DIMM1
Bank Locator: Not Specified
Type: DDR2
Type Detail: Synchronous
Speed: 667 MHz
Manufacturer: 7F7F7F7F7F510000
Serial Number: 0403E324
Asset Tag: 450721
Part Number: 72T256220HR3SA
--
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: 2048 MB //1條2G內存
Form Factor: DIMM
Set: 1
Locator: DIMM2
Bank Locator: Not Specified
Type: DDR2
Type Detail: Synchronous
Speed: 667 MHz
Manufacturer: 7F7F7F7F7F510000
Serial Number: 0403E324
Asset Tag: 450721
Part Number: 72T256220HR3SA
--
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: No Module Installed //1個內存空槽
Form Factor: DIMM
Set: 2
Locator: DIMM3
Bank Locator: Not Specified
Type: DDR2
Type Detail: Synchronous
Speed: Unknown
Manufacturer:
Serial Number:
Asset Tag:
Part Number:
--
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: No Module Installed //1個內存空槽
Form Factor: DIMM
Set: 2
Locator: DIMM4
Bank Locator: Not Specified
Type: DDR2
Type Detail: Synchronous
Speed: Unknown
Manufacturer:
Serial Number:
Asset Tag:
Part Number:
--
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: No Module Installed //1個內存空槽
Form Factor: DIMM
Set: 3
Locator: DIMM5
Bank Locator: Not Specified
Type: DDR2
Type Detail: Synchronous
Speed: Unknown
Manufacturer:
Serial Number:
Asset Tag:
Part Number:
--
Memory Device
Array Handle: 0x1000
Error Information Handle: Not Provided
Total Width: 72 bits
Data Width: 64 bits
Size: No Module Installed //1個內存空槽
Form Factor: DIMM
Set: 3
Locator: DIMM6
Bank Locator: Not Specified
Type: DDR2
Type Detail: Synchronous
Speed: Unknown
Manufacturer:
Serial Number:
Asset Tag:
Part Number:
總結:該服務器有兩條2G內存 ,空餘4個插槽
3 查看硬盤
3.1 查看硬盤大小
# fdisk -l | grep Disk
Disk /dev/cciss/c0d0: 146.7 GB, 146778685440 bytes
總結:硬盤大小146.7G,即廠商標稱的160G
4 查看主板
查看主板型號:
dmidecode |grep -A16 "System Information$"
內存槽及內存條:
dmidecode |grep -A16 "Memory Device$"
五、物理機SN編號以及機型等信息
dmidecode 能夠查看不少物理機的不少信息,包含SN編號、內存、CPU、主板等若干信息,虛擬機也能夠使用該命令,可是獲取到的信息沒有物理機那麼多。
六、檢查物理機是千兆仍是萬兆網卡
ethtool eth 0 |grep Speed
ethtool bond0 |grep Speed #能夠用來檢查bond作的是否合適,合適的狀況下 獲得的網卡速率是普通速率的2倍
七、檢查電源個數
dmidecode |grep 750W |wc -l #在知道電源功率的狀況下能夠執行命令獲取電源個數