As our Server Farm grows bigger and older, It is often tough for our Devops peeps to know the service tag or model no. of a particular board or server, today, I came across a tool to be able to just do that without looking up our inventory data in excel sheets or docs typically.

It is dmidecode, its a centos utility that you can install with yum, you are just a command away from knowing the system details etc, for eg.,

[root@server ~]# dmidecode -t system | grep -i serial
Serial Number: 1PC78X1

Valid type keywords are:
  bios
  system
  baseboard
  chassis
  processor
  memory
  cache
  connector
  slot
On a VMWare Esxi Host, we can use this command to lookup Service Tag :
esxcfg-info -w | grep -i serial