dmidecode 这款软件允许你在 Linux 系统下获取有关硬件方面的信息。Dmidecode 遵循 SMBIOS/DMI 标准,其输出的信息包括 BIOS、系统、主板、处理器、内存、缓存等。
生产环境:
操作系统:CentOS6
Dmidecode命令能帮助我们了解服务器硬件信息,具体用法我们不详讲,可以通过man命令获取帮助。
[root@sky9896 sky]# man dmidecode
[sky@sky9896 ~]$ dmidecode
# dmidecode 2.12
/dev/mem: Permission denied
#登录root才有权限使用dmidecode
[sky@sky9896 ~]$ su
密码:
[root@sky9896 sky]#
[root@sky9896sky]# yum install demidecode �Cy
#可以通过以上命令安装或升级demidecode
[root@sky9896sky]# dmidecode --type baseboard #获取主板信息
# dmidecode2.12
SMBIOS 2.5present.
Handle0x0002, DMI type 2, 15 bytes
Base BoardInformation
Manufacturer: LENOVO
Product Name: LENOVO
Version: To be filled by O.E.M.
Serial Number: SS09294619
Asset Tag: To Be Filled By O.E.M.
Features:
Board is a hosting board
Board is replaceable
Location In Chassis: To Be Filled ByO.E.M.
Chassis Handle: 0x0003
Type: Motherboard
Contained Object Handles: 0
[root@sky9896 sky]# dmidecode --ty processor #获取CPU信息
# dmidecode 2.12
SMBIOS 2.5 present.
Handle 0x0004, DMI type 4, 40 bytes
Processor Information
Socket Designation:CPU 1
Type: CentralProcessor
Family: Other
Manufacturer: Intel
ID: 76 06 01 00 FF FBEB BF
Version: Pentium(R)Dual-Core CPU E5200 @ 2.50GHz
Voltage: 1.2 V
External Clock: 200MHz
Max Speed: 2500 MHz
Current Speed: 2500MHz
Status: Populated,Enabled
Upgrade: Other
L1 Cache Handle:0x0005
L2 Cache Handle:0x0006
L3 Cache Handle:0x0007
Serial Number: To BeFilled By O.E.M.
Asset Tag: To BeFilled By O.E.M.
Part Number: To BeFilled By O.E.M.
Core Count: 2
Core Enabled: 2
Thread Count: 2
Characteristics:
64-bit capable
[root@sky9896 sky]# dmidecode --ty memory #获取内存信息
# dmidecode 2.12
SMBIOS 2.5 present.
Handle 0x000A, DMI type 16, 15 bytes
Physical Memory Array
Location: System BoardOr Motherboard
Use: System Memory
Error Correction Type:None
Maximum Capacity: 4 GB
Error InformationHandle: Not Provided
Number Of Devices: 2
Handle 0x000C, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x000A
Error InformationHandle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 2048 MB
Form Factor: DIMM
Set: None
Locator: DIMM0
Bank Locator: BANK0
Type: DDR2
Type Detail:Synchronous
Speed: 800 MHz
Manufacturer: Manufacturer00
Serial Number:SerNum00
Asset Tag:AssetTagNum0
Part Number:ModulePartNumber00
Handle 0x000E, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x000A
Error InformationHandle: Not Provided
Total Width: Unknown
Data Width: Unknown
Size: No ModuleInstalled
Form Factor: DIMM
Set: None
Locator: DIMM1
Bank Locator: BANK1
Type: Unknown
Type Detail: Unknown
Speed: Unknown
Manufacturer:Manufacturer01
Serial Number:SerNum01
Asset Tag:AssetTagNum1
Part Number:ModulePartNumber01