Last week, I wanted to find the model number of our Linux Server. I knew it was HP DL380 Server but was not sure whether it is a HP Gen8 Server or G7. So I decided to use the DMIDECODE command in Linux to find this information. By using the Dmidecode tool, I was able to find HP model number, serial number, BIOS, CPU, Expansion slots, Memory size etc. Today I will talk about Dmidecode command which helps us to get hardware information from a Linux machine.
Dmidecode is a tool which collects hardware information from SMBIOS and display it in a human readable format. Dmidecode is available in different flavors of Linux (example: RHEL/CentOS/Fedora). Dmidecode does not scan your hardware, it only reports what the BIOS provides to it. You will require root privilege to execute dmidecode command.
Let us see how the dmidecode output will look like. Type the dmidecode command at Linux console:
You will receive a very long list of output, here is a sample output (first few lines are shown here).
DMIDECODE with keywords:
If you would like to find specific hardware information, then you can use different keywords with dmidecode command. The supported keywords are bios, system, baseboard, chassis, processor, memory, cache, connector, slot. Remember that Redhat Linux 4 may not support these options/keywords for dmidecode command. So try using these keywords in RHEL 5 or 6 :).
When you use keywords, ensure that you follow below provided syntax:
Find Server Model Number, Serial Number:
To find the model number and serial number of your Server, use the command dmidecode –t system
As you can see from below provided screenshot, I am using a HP DL380p Gen8 Server. You can also get the Serial number, UUID and Product number of the Server.
Find Processor Information:
To find the Processor information, you can run dmidecode –t processor command at Linux console.
Here I find that this DL380p Gen8 Server is using Intel E5-2630 Processor and it is installed in Processor socket number 1 of System board. You could also find the Voltage, Number of cores, stepping, speed of the processor from the below provided output.
Find Memory information:
To find the memory information of Server, you can run dmidecode –t memory command:
From the output, I understand that this server can support maximum of 384GB of memory. There are 12 Memory slots per Processor and memory slot 1 of processor 1 is installed with 4 GB (1333mhz) of RAM.
Find Internal Expansion slots information:
To find the PCI or PCIe slot information on your Linux machine, you can run dmidecode –t slot command.
From the output, I find there are three PCIe slots available on this server. I also find that slot 1 is a PCIe x16 slot, slot 2 is PCIe x8 and Slot 3 is PCIe x4 slot. You can also find the voltage information here. 🙂
Find the BIOS version:
To find the BIOS version of your Linux Server, you can run following command:
From the below output, I can find that version of BIOS is 03/01/2013. I also understand that BIOS chip is 8MB in size and the features supported by this Server BIOS.
DMIDECODE with DMI IDs:
DMIDECODE can be used with various DMI IDs. These DMI IDs will give you particular hardware information of server. Dmidecode with options ‘-t ‘‘ and ‘ID‘ will provide us the exact information required.
Please check the below provided list to understand the DMI IDs available in Linux.
by using DMI IDs, I can find the Power supply information of my Server. The ID of Power supply is 39 (Check the above table).
Find Power Supply Information:
To find the Power supply information, please run the command: dmidecode –t 39
From the output shown below, I can understand that this server is installed with one 460W power supply. I can also find the Serial number and part number of the Power supply installed on the Server.
Find the NIC information:
To find the NIC information on your HP Server, run the command: dmidecode –t 209
From the output, I understand that this server is shipped with Quad port NIC.
This command gonna be handy for all 🙂
I have not shown all the commands and the output here. Now you can go ahead experiment different commands :). If you need any help, you can run man dmidecode command at the Linux console and it will give you more information.
DMIDECODE pulls the information from BIOS. Sometime this data can be wrong or unreliable. So use it with caution. If you like my article, please share it with your friends and colleagues. Thank you for reading my blog 🙂
You May Also Like: