dmidecode可以读出机器的DMI(DesktopManagement Interface)信息。
这些信息包括了硬件以及BIOS、系统、主板、处理器、内存、缓存等等。

dmidecode在很多Linux上是默认安装的,比如centos等。

使用方法:

1  2 

#dmidecode  #dmidecode -t 1

下面是网友总结的一些常用方法,写在前面方便查找。

#查看服务器型号:

dmidecode |grep-A8"System Information" |grep"Product Name"|sed's/^[ \t]*//'

#查看硬件编号:

dmidecode |grep-A8"System Information" |grep"Serial Number" |sed's/^[ \t]*//'

#现有内容数量和容量:

dmidecode |grep-A16"Memory Device" |grep"Size" |sed's/^[ \t]*//'

#最大支持内存容量:

dmidecode |grep"Maximum  Capacity"  |sed's/^[ \t]*//'

注意grep -A的用法
-A NUM, –after-context=NUM
打印出紧随匹配的行之后的下文 NUM 行。在相邻的匹配组之间将会打印内容是的一行。

dmidecode |grep -i serial   查询SN号
hpacucli ctrl slot=0 pd all show; 查询硬盘故障
hpacucli ctrl slot=0 ld all show; 查询raid模式