Monday, January 26, 2009

Linux get bios information

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
System Information
Manufacturer: innotek GmbH
Product Name: VirtualBox
Version: 1.2
Serial Number: 0
UUID: DB26C8D8-1B46-4F79-BA15-AF685C1A1650
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
innotek GmbH

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:
bios-vendor
bios-version
bios-release-date
system-manufacturer
system-product-name
system-version
system-serial-number
system-uuid
baseboard-manufacturer
baseboard-product-name
baseboard-version
baseboard-serial-number
baseboard-asset-tag
chassis-manufacturer
chassis-type
chassis-version
chassis-serial-number
chassis-asset-tag
processor-family
processor-manufacturer
processor-version
processor-frequency

And for the -t option will have some other options you can specify to retrieve your information:
bios
system
baseboard
chassis
processor
memory
cache
connector
slot

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 .

1 comment:

FeCardona said...

This information helped me a lot.
Thank you!