一、簡介:
1、命令功能:
Dmidecode 這款軟件允許你在 Linux 系統(tǒng)下獲取有關(guān)硬件方面的信息。Dmidecode 遵循 SMBIOS/DMI 標(biāo)準(zhǔn),其輸出的信息包括 BIOS、系統(tǒng)、主板、處理器、內(nèi)存、緩存等等。
dmidecode的作用是將DMI數(shù)據(jù)庫中的信息解碼,以可讀的文本方式顯示。由于DMI信息可以人為修改,因此里面的信息不一定是系統(tǒng)準(zhǔn)確的信息。
2、其他簡介:
DMI (Desktop Management Interface, DMI)就是幫助收集電腦系統(tǒng)信息的管理系統(tǒng),DMI信息的收集必須在嚴(yán)格遵照SMBIOS規(guī)范的前提下進(jìn)行。 SMBIOS(System Management BIOS)是主板或系統(tǒng)制造者以標(biāo)準(zhǔn)格式顯示產(chǎn)品管理信息所需遵循的統(tǒng)一規(guī)范。SMBIOS和DMI是由行業(yè)指導(dǎo)機(jī)構(gòu)Desktop Management Task Force (DMTF)起草的開放性的技術(shù)標(biāo)準(zhǔn),其中DMI設(shè)計適用于任何的平臺和操作系統(tǒng)。
DMI充當(dāng)了管理工具和系統(tǒng)層之間接口的角色。它建立了標(biāo)準(zhǔn)的可管理系統(tǒng)更加方便了電腦廠商和用戶對系統(tǒng)的了解。DMI的主要組成部分是Management Information Format (MIF)數(shù)據(jù)庫。這個數(shù)據(jù)庫包括了所有有關(guān)電腦系統(tǒng)和配件的信息。通過DMI,用戶可以獲取序列號、電腦廠商、串口信息以及其它系統(tǒng)配件信息。
二、選項
-h:顯示幫助信息。
-s:只顯示指定DMI字符串的信息。(string)
-t:只顯示指定條目的信息。(type)
-u:顯示未解碼的原始條目內(nèi)容。
--dump-bin-file:將DMI數(shù)據(jù)轉(zhuǎn)儲到一個二進(jìn)制文件中。
--from-dump FILE:從一個二進(jìn)制文件讀取DMI數(shù)據(jù)。
-V:顯示版本信息。
三、dmidecode支持的數(shù)字參數(shù):
0 BIOS
1 System
2 Base Board
3 Chassis
4 Processor (CPU)
5 Memory Controller
6 Memory Module
7 Cache
8 Port Connector
9 System Slots
10 On Board Devices
11 OEM Strings
12 System Configuration Options
13 BIOS Language
14 Group Associations
15 System Event Log
16 Physical Memory Array
17 Memory Device
18 32-bit Memory Error
19 Memory Array Mapped Address
20 Memory Device Mapped Address
21 Built-in Pointing Device
22 Portable Battery
23 System Reset
24 Hardware Security
25 System Power Controls
26 Voltage Probe
27 Cooling Device
28 Temperature Probe
29 Electrical Current Probe
30 Out-of-band Remote Access
31 Boot Integrity Services
32 System Boot
33 64-bit Memory Error
34 Management Device
35 Management Device Component
36 Management Device Threshold Data
37 Memory Channel
38 IPMI Device
39 Power Supply
四、dmidecode參數(shù)string及type列表:
(1)Valid string keywords are:
· bios-vendor
· bios-version
· bios-release-date
· system-manufacturer
· system-product-name
· system-version
· system-serial-number
· system-uuid
· baseboard-manufacturer
· baseboard-product-name
· baseboard-version
· baseboard-serial-number
· baseboard-asset-tag
· chassis-manufacturer
· chassis-type
· chassis-version
· chassis-serial-number
· chassis-asset-tag
· processor-family
· processor-manufacturer
· processor-version
· processor-frequency
(2)Valid type keywords are:
· bios
· system
· baseboard
· chassis
· processor
· memory
· Cache
· connector
· slot
(3)type全部編碼列表:
· BIOS
· System
· Base Board
· Chassis
· Processor
· Memory Controller
· Memory Module
· Cache
· Port Connector
· System Slots
· On Board Devices
· OEM Strings
· System Configuration Options
· BIOS Language
· Group Associations
· System Event Log
· Physical Memory Array
· Memory Device
· 32-bit Memory Error
· Memory Array Mapped Address
· Memory Device Mapped Address
· Built-in Pointing Device
· Portable Battery
· System Reset
· Hardware Security
· System Power Controls
· Voltage Probe
· Cooling Device
· Temperature Probe
· Electrical Current Probe
· Out-of-band Remote Access
· Boot Integrity Services
· System Boot
· 64-bit Memory Error
· Management Device
· Management Device Component
· Management Device Threshold Data
· Memory Channel
· IPMI Device
· Power Supply
· Additional Information
· Onboard Device
五、實(shí)例
·查看服務(wù)器型號:dmidecode | grep 'Product Name'
·查看主板的序列號:dmidecode |grep 'Serial Number'
·查看系統(tǒng)序列號:dmidecode -s system-serial-number
·查看內(nèi)存信息:dmidecode -t memory
·查看OEM信息:dmidecode -t 11
·現(xiàn)有內(nèi)存數(shù)量和內(nèi)存大?。篸midecode | grep -A16 "Memory Device" | grep "Size" |sed 's/^[ \t]*//'
·支持內(nèi)存容量:dmidecode | grep "Maximum Capacity" |sed "s/^[ \t]*//"