Well, the title could be a little misleading cause this actually works in Linux and with other manufacturer as well, but since we were searching info for this particular topic, and didn’t manage to find anything useful on Google…
Anyway, it’s very very simple. All you have to do is install dmidecode (from Alan Cox) with:
FreeBSD
portinstall dmidecode
or whatever manner you use to install FreeBSD’s ports :)
Debian/Ubuntu
apt-get install dmidecode
Gentoo
emerge dmidecode
NOTE: this work as well with HP servers’ serial numbers and, I suppose, with IBM, Sun etc too.
Once installed, all you have to do is execute
# dmidecode -s chassis-serial-number
et voilĂ , you will get your service tag printed on screen. Moreover if your server is in the datacenter and you cannot remember the exact model
# dmidecode -s system-product-name
PowerEdge 1750
for example.
Just a note: dmidecode is the program used by OCS Inventory client to collect all these data.
I prefer “system-serial-number” b/c one of our small IBMs returns an obviously bogus chassis-serial-number of 123456 but a correct system-serial-number.
And on Dell servers chassis-serial-number and system-serial-number are the same.