认识
官网:https://www.nongnu.org/dmidecode/
文档:https://cgit.git.savannah.gnu.org/cgit/dmidecode.git/tree/man
仓库:http://savannah.nongnu.org/git/?group=dmidecode
Dmidecode reports information about your system’s hardware as described in your system BIOS according to the SMBIOS/DMI standard (see a sample output). This information typically includes system manufacturer, model name, serial number, BIOS version, asset tag as well as a lot of other details of varying level of interest and reliability depending on the manufacturer. This will often include usage status for the CPU sockets, expansion slots (e.g. AGP, PCI, ISA) and memory module slots, and the list of I/O ports (e.g. serial, parallel, USB).
组成
DMI Desktop Management Interface
https://www.dmtf.org/standards/dmi
Due to the rapid development of DMTF technologies, such as Common Information Model (CIM), the DMTF defined an “End of Life” process for DMI, which ended on March 31, 2005.
DMI exposes system data (including the System Management BIOS (SMBIOS) data) to management software, but the two specifications function independently.
DMI is commonly confused with SMBIOS, which was actually called DMIBIOS in its first revisions.
SMBIOS System Management BIOS
https://www.dmtf.org/standards/smbios
https://en.wikipedia.org/wiki/System_Management_BIOS
In computing, the System Management BIOS (SMBIOS) specification defines data structures (and access methods) that can be used to read management information produced by the BIOS of a computer.
This eliminates the need for the operating system to probe hardware directly to discover what devices are present in the computer.
构建
执行如下命令,查看物理内存信息:
apt-get install dmidecode
应用
命令输出类似如下:
# dmidecode 3.2
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.
Handle 0x0005, DMI type 16, 23 bytes
Physical Memory Array
Location: System Board Or Motherboard
Use: System Memory
Error Correction Type: None
Maximum Capacity: 16 GB
Error Information Handle: Not Provided
Number Of Devices: 2
Handle 0x0006, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x0005
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 8192 MB
Form Factor: SODIMM
Set: None
Locator: ChannelA-DIMM0
Bank Locator: BANK 0
Type: DDR3
Type Detail: Synchronous
Speed: 1600 MT/s
Manufacturer: 0215
Serial Number: 00000000
Asset Tag: None
Part Number: CMSX8GX3M1A1600C10
Rank: Unknown
Configured Memory Speed: 1600 MT/s
Handle 0x0007, DMI type 17, 34 bytes
Memory Device
Array Handle: 0x0005
Error Information Handle: Not Provided
Total Width: 64 bits
Data Width: 64 bits
Size: 8192 MB
Form Factor: SODIMM
Set: None
Locator: ChannelB-DIMM0
Bank Locator: BANK 2
Type: DDR3
Type Detail: Synchronous
Speed: 1600 MT/s
Manufacturer: 0215
Serial Number: 00000000
Asset Tag: None
Part Number: CMSX8GX3M1A1600C10
Rank: Unknown
Configured Memory Speed: 1600 MT/s
Maximum Capacity:表示当前支持的最大 16G 内存。
Number Of Devices:输出也显示内存设备数量
参考
Wikipedia / Desktop Management Interface / https://en.wikipedia.org/wiki/Desktop_Management_Interface