SUMMARY : Serial number via software tool?

From: Patrick Shannon <pshannon_at_macromedia.com>
Date: Tue Jul 10 2001 - 13:56:08 EDT
Thanks to all for the many responses.  Most were along the lines "sorry, no way to get it via command line."  Which appears to be true I'm very sorry to say.

There were two interesting things that came out of this.

1) The new Sun Fire servers may have this capability.  A Sun Fire support engineer mentioned the possibility, but not the details.

2) Another kind soul mentioned a software product for sale at www.sar.com which claims to do what I need.  The web site was unresponsive.  I'm skeptical, but will probably check it out again in a week or so.

Patrick

--------------- Original Post --------------------


I have 100+ hosts to inventory.  I would like to quickly collect the serial numbers of these hosts.

Is there a way to generate a Sun server's serial number via the command line?

I have seen this script before, but it does not generate serial numbers that match up with the physical numbers.

---

# Define the serialnumber function which calculates the serial number of the
# host on which it is executed.  serialnumber uses bc to convert a hex value
# to a decimal value.  On a sparc machine, the serial number is a decimal 
# derrivation of the last 3 hex octets of the ethernet address.  serialnumber
# obtains the ethernet address from ifconfig, reduces output to the last 3
# octets of the ethernet address using cut, strips out the leading whitespace
# and colon delimiters using sed, and capitalizes hex letter entries via tr 
# (capitalization is necessary because bc requires uppercase letters when 
# passing hex references).

function serialnumber {
echo "The serial number of `uname -n` is $(echo "obase = 10; ibase = 16; `hostid | cut -c 3-8 | sed 's/://g' | tr '[:lower:]' '[:upper:]'`" | bc)"
}

---

Alternately, does anyone know if there is a formula behind Sun host serial numbers?

Patrick
Received on Tue Jul 10 18:56:08 2001

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2016 - 16:24:58 EDT