Using dmidecode on Linux to find host information

Posted by on Jun 30, 2011 in Linux | No Comments

A handy utility that I use frequently to find information on my systems is dmidecode.  We run Dell PowerEdges, and I frequently need to find the Service Tag for licensing, support, and whatnot.  The utility is a way to get information on the system BIOS, firmware versions, etc.

With dmidecode, I can get this information with a simple, one-line command:

# /usr/sbin/dmidecode|grep 'Serial Number'|head -1
                Serial Number: ABC1234

You can also page through the output to get the model number of the system.  I showed this to our DBA yesterday, so that he could know which systems a client had upgraded to.  As you can see, this system is a PowerEdge 6850:

# /usr/sbin/dmidecode |more
[blah blah blah]
Handle 0x0100
        DMI type 1, 25 bytes.
        System Information
                Manufacturer: Dell Computer Corporation
                Product Name: PowerEdge 6850
                Version: Not Specified
                Serial Number: ABC1234
                UUID: 11122222-3333-4444-5555-666666777777
                Wake-up Type: Power Switch

There’s a lot more information returned by dmidecode than I’ve covered here.  Also, the version included in RHEL 4 does not seem to take any arguments, nor does it have a manpage.  Peeking at CentOS 5, it does accept several arguments (and there’s actually a manpage, hooray!).  YMMV.