1. 程式人生 > >Linux查詢系統硬體資訊命令

Linux查詢系統硬體資訊命令

1.檢視伺服器型號、序列號

$ dmidecode|grep "System Information" -A9|egrep  "Manufacturer|Product|Serial"  
	Manufacturer: Huawei
	Product Name: RH2288 V3
	Serial Number: 2102310YQC**********

2.CPU

$ cat /proc/cpuinfo | grep 'model name' |uniq
model name	: Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz
$ cat /proc/cpuinfo | grep "physical id" | uniq | wc -l
4
$ cat /proc/cpuinfo | grep "cpu cores" | uniq
cpu cores	: 8

總結:該伺服器有4個8核CPU,型號Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz  

3.記憶體

#Linux 檢視記憶體的插槽數,已經使用多少插槽.每條記憶體多大:
$ dmidecode|grep -A5 "Memory Device"|grep Size|grep -v Range
	Size: 8192 MB
	Size: 8192 MB
	Size: 8192 MB
	Size: 8192 MB
	Size: 8192 MB
	Size: 8192 MB
#Linux 檢視記憶體的頻率:
$ dmidecode|grep -A16 "Memory Device"|grep 'Speed'
	Speed: 2133 MHz
	Speed: 2133 MHz
	Speed: 2133 MHz
	Speed: 2133 MHz
	Speed: 2133 MHz
	Speed: 2133 MHz
#Linux 檢視記憶體型號:
$ dmidecode -t memory

4.檢視主機板型號

$ dmidecode |grep -A16 "System Information$"
System Information
	Manufacturer: Huawei
	Product Name: RH2288 V3
	Version: V100R003
	Serial Number: 2102310YQC10********
	UUID: 15EFD63A-8A81-11E6-****-2444279*****
	Wake-up Type: Power Switch
	SKU Number: Type1Sku0
	Family: Type1Family