Dmidecode command reads the system DMI (Desktop Management Interface) table to display hardware and BIOS information of the server. The output of the dmidecode contains several records from the DMI table. This table contains a description of the systems hardware components and also other useful information such as serial number, BIOS revision, etc. As you run it, dmidecode will try to locate the DMI table. If it succeeds, then it will parse this table and display a list of records like this.
The DMI table doesn't only describe what the system is currently made of, it also can report the possible evolution (such as the fastest supported CPU or the maximal amount of memory supported).
This tutorial explains how to use dmidecode to get hardware information on your Linux machine.
1) Get Hardware information on BIOS
To get BIOS version, vendor and other details ,use -t bios
option
# dmidecode -t bios # dmidecode 2.9 SMBIOS 2.31 present. Handle 0x0000, DMI type 0, 20 bytes BIOS Information Vendor: Phoenix Technologies LTD Version: 6.00 Release Date: 04/10/2007 Address: 0xE7A00 Runtime Size: 99840 bytes ROM Size: 64 kB Characteristics: ISA is supported PCI is supported PC Card (PCMCIA) is supported PNP is supported APM is supported BIOS is upgradeable BIOS shadowing is allowed ESCD support is available USB legacy is supported Smart battery is supported BIOS boot specification is supported [root@mailserver ~]#
2) Get Hardware information about system
Use -t system
to get hardware information about system
# dmidecode -t system # dmidecode 2.9 SMBIOS 2.31 present. Handle 0x0001, DMI type 1, 25 bytes System Information Manufacturer: VMware, Inc. Product Name: VMware Virtual Platform Version: None Serial Number: VMware-56 4d eb 70 28 36 a8 c0-08 bb 55 cf dc e6 4f 60 UUID: 564DEB70-2836-A8C0-08BB-55CFDCE64F60 Wake-up Type: Power Switch Handle 0x001C, DMI type 15, 29 bytes System Event Log Area Length: 16 bytes Header Start Offset: 0x0000 Header Length: 16 bytes Data Start Offset: 0x0010 Access Method: General-purpose non-volatile data functions Access Address: 0x0000 Status: Invalid, Full Change Token: 0x00000036 Header Format: Type 1 Supported Log Type Descriptors: 3 Descriptor 1: POST error Data Format 1: POST results bitmap Descriptor 2: Single-bit ECC memory error Data Format 2: Multiple-event Descriptor 3: Multi-bit ECC memory error Data Format 3: Multiple-event Handle 0x0026, DMI type 23, 13 bytes System Reset Status: Enabled Watchdog Timer: Present Boot Option: Do Not Reboot Boot Option On Limit: Do Not Reboot Reset Count: Unknown Reset Limit: Unknown Timer Interval: Unknown Timeout: Unknown Handle 0x0029, DMI type 32, 20 bytes System Boot Information Status: #
3) Hardware information about baseboard
Use -t baseboard
to get information about baseboard
# dmidecode -t baseboard # dmidecode 2.9 SMBIOS 2.31 present. Handle 0x0002, DMI type 2, 8 bytes Base Board Information Manufacturer: Intel Corporation Product Name: 440BX Desktop Reference Platform Version: None Serial Number: None Handle 0x001A, DMI type 10, 8 bytes On Board Device 1 Information Type: Video Status: Disabled Description: VMware SVGA II On Board Device 2 Information Type: Sound Status: Disabled Description: ES1371 #
4) Getting HW information about chassis
Use -t chassis
for fetch details about system chassis
# dmidecode -t chassis # dmidecode 2.9 SMBIOS 2.31 present. Handle 0x0003, DMI type 3, 17 bytes Chassis Information Manufacturer: No Enclosure Type: Other Lock: Not Present Version: N/A Serial Number: None Asset Tag: No Asset Tag Boot-up State: Safe Power Supply State: Safe Thermal State: Safe Security Status: None OEM Information: 0x00001234
Similarly, you find the hardware information like processor, memory, cache, connector and slot.
# dmidecode -t memory # dmidecode -t cashe # dmidecode -t processor # dmidecode -t connector # dmidecode -t slot
There is DMI types; this DMI type id will give information about a particular hardware component of your system. There are more than 100 types, for examples here are some type ids.
DMI TYPES
The SMBIOS specification defines the following DMI type information:
Type DMI
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 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
Additionally, type 126 is used for disabled entries and type 127 is an end-of-table marker. Types 128 to 255 are for OEM-specific data. Dmidecode will display these entries by default, but it can only decode them when the vendors have contributed documentation or code for them.
Keywords can be used instead of type numbers with --type. Each keyword is equivalent to a list of type numbers:
Keyword Types
------------------------------
bios 0, 13
system 1, 12, 15, 23, 32
baseboard 2, 10
chassis 3
processor 4
memory 5, 6, 16, 17
cache 7
connector 8
slot 9
5) Get processor hardware information
Using type id we can get processor information
# dmidecode -t 4 | head # dmidecode 2.9 SMBIOS 2.31 present. Handle 0x0004, DMI type 4, 35 bytes Processor Information Socket Designation: CPU socket #0 Type: Central Processor Family: Unknown Manufacturer: AuthenticAMD ID: 23 0F 10 00 FF FB 8B 07
6) Get 64-bit Memory Error
Use -t id to get memory error information
# dmidecode -t 33 # dmidecode 2.9 SMBIOS 2.31 present. Handle 0x002A, DMI type 33, 31 bytes 64-bit Memory Error Information Type: OK Granularity: Unknown Operation: Unknown Vendor Syndrome: Unknown Memory Array Address: 0x0000000080000000 Device Address: 0x0000000080000000 Resolution: Unknown
7) Grep option to get product details
Since its big file, you can use grep command to search for a string you look for.
# dmidecode | grep -i prod
Conclusion
This tutorial we learned how to use dmidecode command and its options to get different hardware information. I hope you enjoyed reading and please leave your suggestions.