Dmidecode This software allows you to obtain information about the hardware in the Linux system. Dmidecode follows the SMBIOS/DMI standard, and its output information includes BIOS, System, motherboard, processor, memory, cache, etc.
I. Introduction of DMI:
DMI (Desktop Management Interface, DMI) is a management system that helps collect computer system information, and the collection of DMI information must be carried out in strict compliance with SMBIOS specifications. The SMBIOS (System Management BIOS) is the unified specification that a motherboard or system manufacturer must follow to display product management information in a standard format. Smbios and DMI are open technical standards drafted by the industry-directed desktop Management Task Force (DMTF), where DMI is designed for any platform and operating system.
DMI acts as the interface between the management tool and the system layer. it makes it easier for computer vendors and users to understand the system by setting up a standard manageable system. The main component of DMI is the management Information Format (MIF) database. This database includes all information about computer systems and accessories. With DMI, users can get serial numbers, computer vendors, serial port information, and other system accessory information.
The output format of the Dmidecode is generally as follows:
—————————————-
Handle 0x0002
DMI Type 2, 8 bytes
Base Board Information
Manufacturer:intel
Product name:c440gx+
version:727281-0001
Serial number:incy92700942
—————————————-
The first three lines are called the record header (Recoce header), which includes:
1. Recode ID (handle): The record identifier in the DMI table, which is unique, such as the handle 0x0002 in the previous example.
2. DMI Type ID: The type of record, for example: Bios,memory, the above example is Type 2, which is "Base Board information"
3, Recode size:dmi table in the corresponding record size, the above example is 8 bytes. (Excluding text information, all actual output content is larger than this size.) )
After the record header is the value of the record:
4. Decoded values: The record value can be multiple lines, such as the previous example shows the motherboard manufacturer (manufacturer), model, version, and serial number.
Second, the role of Dmidecode:
The role of Dmidecode is to decode the information in the DMI database and display it in a readable text manner. Since DMI information can be artificially modified, the information inside is not necessarily a system-accurate information.
Third, installation Dmidecode:
Dmidecode can be found in the mainstream Linux distribution, simply by installing the Package Manager for the distribution you use, such as:
apt-get install dmidecode
# Debian/Ubuntu
yum install dmidecode
# RHEL/CentOS/Fedora
pacman -S dmidecode
# Arch Linux
emerge -av dmidecode
# Gentoo
Or use the official source package to install:
Dmidecode Source Package: http://download.savannah.gnu.org/releases/dmidecode/
Win version: http://gnuwin32.sourceforge.net/packages/dmidecode.htm
Iv. dmidecode Command usage:
Execution with no option Dmidecode typically outputs all hardware information.
Dmidecode has a very useful option-T, which can output information by the specified type, and if you want to get information about the processor, you can perform
dmidecode -t processor
Output:
# dmidecode 2.10
SMBIOS 2.6 present.
Handle 0x0004, DMI type 4, 40 bytes
Processor Information
Socket Designation: CPU 1
Type: Central Processor
Family: Xeon
Manufacturer: Intel
ID: A5 06 01 00 FF FB EB BF
Signature: Type 0, Family 6, Model 26, Stepping 5
Flags:
FPU (Floating-point unit on-chip)
VME (Virtual mode extension)
DE (Debugging extension)
------
Usage: dmidecode [OPTIONS]
Options are:
-d, --dev-mem FILE Read memory from device FILE (default: /dev/mem)
#从设备文件读信息,输出内容与不加参数标准输出相同
-h, --help Display this help text and exit
#显示帮助信息
-q, --quiet Less verbose output
#显示更少的简化信息
-s, --string KEYWORD Only display the value of the given DMI string
#只显示指定DMI字符串的信息
-t, --type TYPE Only display the entries of given type
#只显示指定条目的信息
-u, --dump Do not decode the entries
#显示未解码的原始条目内容
--dump-bin FILE Dump the DMI data to a binary file
--from-dump FILE Read the DMI data from a binary file
-V, --version Display the version and exit
#显示版本信息
V. Dmidecode parameter string and type list
(1) Valid string keywords is:
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
Slots
(3) Type all Codes List
Type Information
—————————————-
0 BIOS
1 System
2 Base Board
3 Chassis
4 Processor
5 Memory Controller
6 Memory Module
7 Cache
8 Port Connector
9 System Slots
Ten on Board Devices
OEM Strings
System Configuration Options
BIOS Language
Associations Group
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
Notoginseng Memory Channel
The IPMI Device
The Power supply
Additional Information
Onboard Device
Vi. Command Usage Examples:
1. View Server model:dmidecode | grep ‘Product Name‘
2. Check the serial number of the motherboard:dmidecode |grep ‘Serial Number‘
3. Check the system serial number:dmidecode -s system-serial-number
4. View memory Information:dmidecode -t memory
5. View OEM Information:dmidecode -t 11
For more usage of dmidecode, you can query by specifying the-H option.
Where TypeCode is the device type code, the specific code is as follows:
0 BIOS 1 System 2& nbsp base board 3 Chassis 4 p rocessor 5 memory controller 6   ; Memory module 7 Cache 8 port C onnector 9 system slots 10 on B Oard devices 11 oem strings 12 s Ystem Configuration options 13 bios language &NBSP ;14 group associations 15 system Event log &N Bsp 16&nbsP physical Memory array 17 memory device &NBSP ;18 32-bit Memory error 19 memory Array Mapped address &nbs P 20 memory Device Mapped address 21 built-in P Ointing device 22 portable battery 23 system reset 24 hardware security 25& nbsp system Power controls 26 voltage probe &NBSP ;27 cooling device 28 temperature probe &NBS P 29 electrical current probe 30 out-of-band Remote access& nbsp 31 boot Integrity services 32 system BOOT&NB Sp 33 64-bit Memory error 34 management D evice 35 management Device component  36&NBS P management Device Threshold data 37 memory channel 38  IPMI device 39 power Supply For example, use DMIDECODE-T 1 to To view motherboard information (manufacturer, model, serial number, etc.) use DMIDECODE-T 4 to view CPU information (number of CPUs, model, size, frequency, etc.) using DMIDECODE-T 17 to view memory information (number of slots, memory type, size, frequency, etc.)
"Go" dmidecode command in a detailed