In some cases you would like to have some information about your hardware while your system is up and running. You might wonder what version your bios is. When starting you PC you can see this however it is not always desired to reboot your system only to get this information. Under Linux you can use the dmidecode command to retrieve this information. This command will decode the information available in the DMI table in such a way that we humans can read it.
Looking at the man page of dmidecode we can see all the information about the command... here are some examples:
Read the information about your system type:
root@orcl11gdb:~# dmidecode -t system
# dmidecode 2.9
SMBIOS 2.5 present.
Handle 0x0001, DMI type 1, 27 bytes
Manufacturer: innotek GmbH
Product Name: VirtualBox
Serial Number: 0
Wake-up Type: Power Switch
SKU Number: Not Specified
Family: Virtual Machine
Read the system manufacturer in a single string:
root@orcl11gdb:~# dmidecode -s system-manufacturer
in basics the -s option will give you the information in a single string format where the -t option will present you with much more information at once. So when you are scripting a script which will get you some specific information, for example as input for a installation script you will use the -s option.
Valid string keywords are:
And for the -t option will have some other options you can specify to retrieve your information:
So, as you can see this command can help you to get a lot of information about the hardware you are working on. In case you are looking into your hardware platform, for example to make a overview of your datacenter you do not have to go into the datacenter itself to get all the information. Also you do need to wander around the office to get all the information, you can simple use dmidecode as a starting point. There are other commands, some even better however much of them are specifically developed by hardware manufacturers for there hardware and do also have a management en reporting side. Just looking for a good and quick linux command, dmidecode is your tool of choice. A great script is done in this example of a perl script which can be found at http://www.hollenback.net/sysadmin/CheckProcs.txt .