Using "sneep" to find/set the chassis serial number
There are a number of Solaris commands and utilities that allow you to retrieve the serial number from a server (
prtpicl) to name a few, and possibly many more exist...
In this article we take a look at sneep.
Under Solaris, we can use the
sneep utility to retreive the Chasis Serial Number (CSN) or the Product Serial Number (PSN).
sneep searches for the serial number in several data sources, including the system eeprom, platform-specific hardware-based sources, the Sun explorer configuration files, and other locations.
Download and Install sneep
sneep is NOT installed by default in Solaris. However, you can download the latest version from SunSolve via the link http://www.sun.com/sneep. (requires an active sunsolve account)
(as of writing the latest version of sneep is 2.6)
- Download sneep from SunSolve
- Decompress the downloaded file
# uncompress SUNWsneep2.6.tar.Z
- Extract the tar image
# tar -xf SUNWsneep2.6.tar
- Install the sneep package
# pkgadd -d . SUNWsneep
- NOTE: If you didn?t accept to create a link file in /usr/sbin during the
pkgadd, Add the symbolic link as follows;
# /opt/SUNWsneep/bin/add_sneep_to_binThis will create a symbolic link in
/usr/sbinunless you specify a directory name.
- Display serial number
To display the serial number previously assigned, simply run
sneepwith no arguements. For example:
# sneep 0A1B2C3D4E
- Display serial number and Associated tag
To display the serial number and it's associated tag stored in the EEPROM (displayed all stored tags/values), simply run:
# sneep -T "ChassisSerialNumber" "0A1B2C3D4E"
- Store serial number in EEPROM
To store the serial number in the EEPROM, simply execute:
sneep -s <serial-number>For example:
# sneep -s 9F8E7D6E5D # sneep 9F8E7D6E5D
- Storing additional information
As well as the serial number, you can store other information in the EEPROM simply by adding a value and it's associated tag:
sneep -t <tag> -s <value>For example, lets add an 'Asset Tag', the 'Location' and 'Site Name' for our system:
# sneep -t "AssetTag" -s 0084838
# sneep -t "Location" -s GB-England
# sneep -t "SiteName" -s EGMP03
# sneep -T "ChassisSerialNumber" "9F8E7D6E5D" "AssetTag" "0084838" "Location" "GB-England" "SiteName" "EGMP03"