≡ Menu

How To Get Hardware Information On Linux Using dmidecode Command

[Mother Board]Photo courtesy of B Naveen Kumar

dmidecode command reads the system DMI table to display hardware and BIOS information of the server. Apart from getting current configuration of the system, you can also get information about maximum supported configuration of the system using dmidecode. For example, dmidecode gives both the current RAM on the system and the maximum RAM supported by the system.

This article provides an overview of the dmidecode and few practical examples on how to use dmidecode command.

1. Overview of dmidecode

Distributed Management Task Force maintains the DMI specification and SMBIOS specification. The output of the dmidecode contains several records from the DMI (Desktop Management interface) table.

Following is the record format of the dmidecode output of the DMI table.

Record Header: Handle {record id}, DMI type {dmi type id}, {record size} bytes
Record Value: {multi line record value}
  • record id: Unique identifier for every record in the DMI table.
  • dmi type id: Type of the record. i.e BIOS, Memory etc.,
  • record size: Size of the record in the DMI table.
  • multi line record values: Multi line record value for that specific DMI type.

Sample output of dmidecode command:

# dmidecode | head -15

# dmidecode 2.9
SMBIOS 2.3 present.
56 structures occupying 1977 bytes.
Table at 0x000FB320.

Handle 0xDA00, DMI type 218, 11 bytes
OEM-specific Type
        Header and Data:
                DA 0B 00 DA B0 00 17 03 08 28 00

Handle 0x0000, DMI type 0, 20 bytes
BIOS Information
        Vendor: Dell Computer Corporation
        Version: A07
        Release Date: 01/13/2004

Get the total number of records in the DMI table as shown below:

# dmidecode | grep ^Handle | wc -l
56

(or)

# dmidecode | grep structures
56 structures occupying 1977 bytes.

2. DMI Types

DMI Type id will give information about a particular hardware component of your system. Following command with type id 4 will get the information about CPU of the system.

# dmidecode -t 4
# dmidecode 2.9
SMBIOS 2.3 present.

Handle 0x0400, DMI type 4, 35 bytes
Processor Information
        Socket Designation: Processor 1
        Type: Central Processor
        Family: Xeon
        Manufacturer: Intel
        ID: 29 0F 00 00 FF FB EB BF
        Signature: Type 0, Family 15, Model 2, Stepping 9
        Flags:
                FPU (Floating-point unit on-chip)
                VME (Virtual mode extension)
                DE (Debugging extension)
                PSE (Page size extension)
                TSC (Time stamp counter)
                MSR (Model specific registers)

Following are the different DMI types available.

       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
         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

Instead of type_id, you can also pass the keyword to the -t option of the dmidecode command. Following are the available keywords.

       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

For example, to get all the system baseboard related information execute the following command, which will display the type_id 2 and 10

# dmidecode -t baseboard
# dmidecode 2.9
SMBIOS 2.3 present.

Handle 0x0200, DMI type 2, 9 bytes
Base Board Information
        Manufacturer: Dell Computer Corporation
        Product Name: 123456
        Version: A05
        Serial Number: ..CN123456789098.

Handle 0x0A00, DMI type 10, 14 bytes
On Board Device 1 Information
        Type: SCSI Controller
        Status: Enabled
        Description: LSI Logic 53C1030 Ultra 320 SCSI
On Board Device 2 Information
        Type: SCSI Controller
        Status: Enabled
        Description: LSI Logic 53C1030 Ultra 320 SCSI
On Board Device 3 Information
        Type: Video
        Status: Enabled
        Description: ATI Rage XL PCI Video
On Board Device 4 Information
        Type: Ethernet
        Status: Enabled
        Description: Broadcom Gigabit Ethernet 1
On Board Device 5 Information
        Type: Ethernet
        Status: Enabled
        Description: Broadcom Gigabit Ethernet 2

3. Get Physical Memory (RAM) information using dmidecode

What is the maximum RAM supported by the system? In this example, this system can support maximum 8GB of RAM.

# dmidecode -t 16
# dmidecode 2.9
SMBIOS 2.3 present.

Handle 0x1000, DMI type 16, 15 bytes
Physical Memory Array
        Location: System Board Or Motherboard
        Use: System Memory
        Error Correction Type: Multi-bit ECC
        Maximum Capacity: 8 GB
        Error Information Handle: Not Provided
        Number Of Devices: 4


How much memory can I expand to? From /proc/meminfo you can find out the total current memory of your system as shown below.

# grep MemTotal /proc/meminfo
MemTotal:      1034644 kB


In this example, the system has 1GB of RAM. Is this 1 x 1GB (or) 2 x 512MB (or) 4 x 256MB? This can be figured out by passing the type id 17 to the dmidecode command as shown below. Please note in the example below, if you have to expand upto 8GB of maximum RAM, you need to remove the existing 512MB from slot 1 and 2, and use 2GB RAM on all the 4 memory slots.

# dmidecode -t 17
# dmidecode 2.9
SMBIOS 2.3 present.

Handle 0x1100, DMI type 17, 23 bytes
Memory Device
        Array Handle: 0x1000
        Error Information Handle: Not Provided
        Total Width: 72 bits
        Data Width: 64 bits
        Size: 512 MB  [Note: Slot1 has 512 MB RAM]
        Form Factor: DIMM
        Set: 1
        Locator: DIMM_1A
        Bank Locator: Not Specified
        Type: DDR
        Type Detail: Synchronous
        Speed: 266 MHz (3.8 ns)

Handle 0x1101, DMI type 17, 23 bytes
Memory Device
        Array Handle: 0x1000
        Error Information Handle: Not Provided
        Total Width: 72 bits
        Data Width: 64 bits
        Size: 512 MB [Note: Slot2 has 512 MB RAM]
        Form Factor: DIMM
        Set: 1
        Locator: DIMM_1B
        Bank Locator: Not Specified
        Type: DDR
        Type Detail: Synchronous
        Speed: 266 MHz (3.8 ns)

Handle 0x1102, DMI type 17, 23 bytes
Memory Device
        Array Handle: 0x1000
        Error Information Handle: Not Provided
        Total Width: 72 bits
        Data Width: 64 bits
        Size: No Module Installed [Note: Slot3 is empty]
        Form Factor: DIMM
        Set: 2
        Locator: DIMM_2A
        Bank Locator: Not Specified
        Type: DDR
        Type Detail: Synchronous
        Speed: 266 MHz (3.8 ns)

Handle 0x1103, DMI type 17, 23 bytes
Memory Device
        Array Handle: 0x1000

        Error Information Handle: Not Provided
        Total Width: 72 bits
        Data Width: 64 bits
        Size: No Module Installed [Note: Slot4 is empty]
        Form Factor: DIMM
        Set: 2
        Locator: DIMM_2B
        Bank Locator: Not Specified
        Type: DDR
        Type Detail: Synchronous
        Speed: 266 MHz (3.8 ns)

4. Get BIOS information using dmidecode

# dmidecode -t bios
# dmidecode 2.9
SMBIOS 2.3 present.

Handle 0x0000, DMI type 0, 20 bytes
BIOS Information
        Vendor: Dell Computer Corporation
        Version: A07
        Release Date: 01/13/2004
        Address: 0xF0000
        Runtime Size: 64 kB
        ROM Size: 4096 kB
        Characteristics:
                ISA is supported
                PCI is supported
                PNP is supported
                BIOS is upgradeable
                BIOS shadowing is allowed
                ESCD support is available
                Boot from CD is supported
                Selectable boot is supported
                EDD is supported
                Japanese floppy for Toshiba 1.2 MB is supported (int 13h)
                5.25"/360 KB floppy services are supported (int 13h)
                5.25"/1.2 MB floppy services are supported (int 13h)
                3.5"/720 KB floppy services are supported (int 13h)
                8042 keyboard services are supported (int 9h)
                Serial services are supported (int 14h)
                CGA/mono video services are supported (int 10h)
                ACPI is supported
                USB legacy is supported
                LS-120 boot is supported
                BIOS boot specification is supported
                Function key-initiated network boot is supported

Handle 0x0D00, DMI type 13, 22 bytes
BIOS Language Information
        Installable Languages: 1
                en|US|iso8859-1
        Currently Installed Language: en|US|iso8859-1

5. View Manufacturer, Model and Serial number of the equipment using dmidecode

You can get information about the make, model and serial number of the equipment as shown below:

# dmidecode -t system
# dmidecode 2.9
SMBIOS 2.3 present.

Handle 0x0100, DMI type 1, 25 bytes
System Information
        Manufacturer: Dell Computer Corporation
        Product Name: PowerEdge 1750
        Version: Not Specified
        Serial Number: 1234567
        UUID: 4123454C-4123-1123-8123-12345603431
        Wake-up Type: Power Switch

Handle 0x0C00, DMI type 12, 5 bytes
System Configuration Options
        Option 1: NVRAM_CLR:  Clear user settable NVRAM areas and set defaults
        Option 2: PASSWD:  Close to enable password

Handle 0x2000, DMI type 32, 11 bytes
System Boot Information
        Status: No errors detected

If you enjoyed this article, you might also like..

  1. 50 Linux Sysadmin Tutorials
  2. 50 Most Frequently Used Linux Commands (With Examples)
  3. Top 25 Best Linux Performance Monitoring and Debugging Tools
  4. Mommy, I found it! – 15 Practical Linux Find Command Examples
  5. Linux 101 Hacks 2nd Edition eBook Linux 101 Hacks Book

Bash 101 Hacks Book Sed and Awk 101 Hacks Book Nagios Core 3 Book Vim 101 Hacks Book

{ 19 comments… add one }

  • suresh December 16, 2008, 5:02 am

    excellent article

  • Nithin Haridas May 28, 2009, 10:22 pm

    This is really helpful

  • Deniz Ogut March 9, 2010, 9:30 am

    Very useful article. Thanks a lot.

  • Nethaji Reddy July 25, 2010, 12:51 am

    Very Very thankful to you for providing this info..

  • Ken August 31, 2010, 6:40 am

    You’ve made dmidecode completely clear and useful. Thank You.

  • Christy October 15, 2010, 2:06 pm

    This is a GREAT help – thank you

  • Nitin February 2, 2011, 9:12 am

    Thanks a lot ….useful article

  • Hari Ganesh February 19, 2011, 12:27 pm

    very good article. I like this.

  • sibasundar March 13, 2011, 11:07 am

    thank you very much. please give us these type of essential and useful things.

  • Anonymous August 8, 2011, 3:31 am

    thank for the information

  • GOPI September 21, 2011, 3:30 am

    excellent very helpful

  • john November 30, 2011, 2:17 pm

    thanks ….very useful info..!!

  • Anonymous April 6, 2012, 2:48 am

    Indeed, this is such a gr8 information, Thanks a ton and keep sharing!!!

  • I found it helpfull September 21, 2012, 5:41 am

    Thank You very much. I am preparing for the lpic exams and found this useful. Any more in the line of lpic exams?
    Thanks for sharing you knowledge.

  • Somashekar H January 25, 2013, 7:04 am

    Very useful link. Thank you for the all the information put on this link.

  • srinivas January 30, 2013, 1:15 pm

    Is there any equvalent command for dmidecode in scounix
    Thanks

  • sudhir June 27, 2013, 1:38 am

    dmidecode -t 16 gives wrong information…
    as per the output of below command it says maximum supported RAM is 4 GB, but i have installed 8GB and it works fine. I ran this command on dell optiplex 380

    root@computeNode:~# dmidecode -t 16
    # dmidecode 2.11
    SMBIOS 2.5 present.

    Handle 0x1000, DMI type 16, 15 bytes
    Physical Memory Array
    Location: System Board Or Motherboard
    Use: System Memory
    Error Correction Type: None
    Maximum Capacity: 4 GB
    Error Information Handle: Not Provided
    Number Of Devices: 2

    root@computeNode:~#
    —————————————————————————————
    root@computeNode:~# dmidecode -t 17
    # dmidecode 2.11
    SMBIOS 2.5 present.

    Handle 0x1100, DMI type 17, 27 bytes
    Memory Device
    Array Handle: 0x1000
    Error Information Handle: Not Provided
    Total Width: 64 bits
    Data Width: 64 bits
    Size: 4096 MB
    Form Factor: DIMM
    Set: None
    Locator: DIMM_1
    Bank Locator: Not Specified
    Type: DDR3
    Type Detail: Synchronous
    Speed: 800 MHz
    Manufacturer: 014F00000000
    Serial Number: 00090875
    Asset Tag: 54112700
    Part Number: JM1333KLN-4G

    Handle 0x1101, DMI type 17, 27 bytes
    Memory Device
    Array Handle: 0x1000
    Error Information Handle: Not Provided
    Total Width: 64 bits
    Data Width: 64 bits
    Size: 4096 MB
    Form Factor: DIMM
    Set: None
    Locator: DIMM_2
    Bank Locator: Not Specified
    Type: DDR3
    Type Detail: Synchronous
    Speed: 800 MHz
    Manufacturer: 80AD000080AD
    Serial Number: 2692E0FF
    Asset Tag: 01112200
    Part Number: HMT351U6BFR8C-H9
    ———————————————————————————–
    root@computeNode:~# lshw -short
    H/W path Device Class Description
    ==============================================================
    system OptiPlex 380 ()
    /0 bus 01TKCC
    /0/0 memory 64KiB BIOS
    /0/400 processor Pentium(R) Dual-CoreCPUE5800
    /0/400/700 memory 128KiB L1 cache
    /0/400/701 memory 2MiB L2 cache
    /0/1000 memory 8GiB System Memory
    /0/1000/0 memory 4GiB DIMM DDR3 Synchronous 800 MHz (1.2 ns)
    /0/1000/1 memory 4GiB DIMM DDR3 Synchronous 800 MHz (1.2 ns)
    ———————————————————————————————————–
    root@computeNode:~# dmidecode -t system
    # dmidecode 2.11
    SMBIOS 2.5 present.

    Handle 0x0100, DMI type 1, 27 bytes
    System Information
    Manufacturer: Dell Inc.
    Product Name: OptiPlex 380
    Version: Not Specified
    Serial Number: 2Z7MWE1
    UUID: 44454C4C-5A00-1037-804D-B2C456575131
    Wake-up Type: Power Switch
    SKU Number: Not Specified
    Family: Not Specified

  • Dinesh Murani May 9, 2014, 11:00 am

    Thank you Ramesh. It’s really good informational article. Keep writing and share. :)

  • Lee Higginbotham July 2, 2014, 1:17 pm

    All,

    This is an excellent article! Thank you for this awesome information.

    I have one question for the group. I used the command dmidecode -t 24 and it returns only version of the dmidecode of 2.11 and that the SMBIOS 2.7 is present. I have performed this code on other servers and it displays. Any assistance would be wonderful. The server is an HP Proliant DL580 G7.

    Sincerely,
    Lee

Leave a Comment