Digging into your Linux system's hardware

22.01.2016
Ever find yourself having to look into the particulars of your servers' hardware Maybe you go scrounging for the original invoice or for some email you were sent several years ago or the quote that was generated when you were about to purchase it Well, stop, there's an alternative that you're probably going to like quite a bit. You can get your hardware to tell you about itself. Just use a command called dmidecode.

The name "dmidecode" might not ring any bells, but the "dmi" part of the name stands for "Desktop Management Interface". It's an API that allows you to gather information about the your system's underlying hardware. The command is designed to work on any Linux system as it was originally designed by a consortium -- the Desktop Management Task Force -- for gathering information and configuring systems.

The dmidecode command gets its data from the DMI tables stored in memory and presents it in a human readable format. The commands that you will probably like the most are commands like these:

These commands show that the system that Linux is running on is a Dell PowerEdge R710. And, while piping the dmidecode's output to grep might seem a bit "much", you should note that the command generates quite a bit of output -- often more than a thousand lines. Looking for specific lines will probably save you quite a bit of time.

Finding the serial number of the system:

Finding out something about the CPUs:

Determining if the system has a RAID array:

You can also learn about specific components if you know their type identifiers. For example, processors are type 4, so let's pull up information on the processors (much more than we looked at in the command above).

That's a lot of information and probably more than most of us want to know, but for some people, this level of detail might be very important. And note that this output is only showing the first of the two CPUs to keep it from dominating this post.

And, no, you don't have to memorize the device types. You'll find a table like this in the dmidecode command's man page or you can reference this nice little post every time you get curious (I'd suspect the man page is a tad easier to find).

You'll probably find that dmidecode knows a lot more about your servers' hardware than you'd ever want to understand, but the command makes it easy to fetch information when yoiu need it and doesn't require you to go scrounging through your file cabinet or your old email.

And you don't have to be anywhere near the systems to find the information that you need.

(www.computerworld.com)

Sandra Henry-Stocker