CLI for serial number or tag for BIOS

what file or command can be used to get information that can represent unique ID for BIOS installed, it could be serial number or some tag.

I used "/usr/sbin/dmidecode | egrep -i 'BIOS Information' -A 20" command, it shows some information about BIOS but not some information that can be used as ID.

I tried using command "vpddecode" but it does not give required output on linux boxes:

# vpddecode
# vpddecode 2.9
# No VPD structure found, sorry.

Hi epriya2003,

If you are using solaris x86, you could try the following:

# ipmitool fru | grep �Product Serial�

I hope this is of help.

PC's don't have reliable, consistent unique ID's. Stick among one model of one brand of PC and they might if you're lucky. Intel tried to introduce this with CPU unique IDs and the public was so spooked they took it back out. You could look at the mac addresses of installed network cards, though these will of course change if the network cards are replaced... You could also get the UUID of the root partition, and things like that.

dmidecode -s system-serial-number

That's the right way.

dmidecode -s chassis-serial-number

that might work, but in a blade situation, that should return the serial number of the enclosure and not the blade.

Also, you can use hostid if it's there, but on Red Hat, dmidecode should work ok... fallback to hostid.... or maybe hostid should be the main thing. I just like serial numbers, but they are not always present for all machines.

As a quick note, don't blindly trust dmidecode. Information in the DMI table is usually filled by the manufacturer with correct values and although it's a useful tool, it's not always 100% reliable.