Anyone know how to get Serial number with 1 command?

Solaris8

Anyone help?

Looking for system serial number.....

Please help...

See if this post helps:

Still stuck I am afraid...

I went to site and retrieve the serial number visually, but would still be interested if anyone knows how to obtain the serial number of a system from the command line for future knowledge...

Thanks!!

There is no way to retrieve the serial number from a Solaris system other than physically retriving it. Let's hope Sun gets smarter in future releases.

Cheers,

Keith

Okay - thanks..

Tis a pity - I know you can get in on HP OpenVMS... not sure about HP UX...

But as you say - Lets hope the include it in future releases....

Does : /usr/sbin/platform/sun4u/prtdiag -v
not show you the id. I am not behind a Sun terminal, so I can't check. Also the location is a "somewhere there".

Even "eeprom" should allow you to run OBP commands.

Regs david

prtdiag does not show you the serial number that is on the back of the system. As for the other, I don't see a corelation there either.

Cheers,

Keith

If you can get to the system console you can drop it down into the >OK prompt( by pressing the STOP-A key sequence)

then once at the prompt type "banner" to show the system banner and the serial # is posted there for you. but if you can not get to the console, they I am not aware of a shell commend that will allow you to display the serial #.

I tried the prtdiag -v and it just shows the hardware that is installed on the system.. Processors, Memory, Power supplies, etc..

I use a SunFire 280R, V880, and ultra5, and they all display the serial # in the OBP at startup.

In responce to davidg's responce. EEPROM can only set variables and diagnostice switches from a running shell, it can not run OBP command such as "banner", or "boot cdrom -s".

Jonathan

Note to early reply************

you Must do an "init 0" before pressing the Key sequence "STOP-A"

If you do not bring it to a single user mode you will croupt you file systems

a BIG MUST!!!!!

Jonathan

I think a simple reboot shld work .. when the system first comes up just after the banner and sun logo u have the serial number ..

I think so

I dunno if hostid works ...

The serial number you see in the OBP when it boots is *not* the same as the system serial number on the Sun sticker on the back of the machine.

I believe that it is the serial number of the prom chip, but I'm not sure of that. But in any case, if you need the system serial number itself you can't get it from the command line.

Now that you've gone to the site to read the physical serial number,
you might get some benefit from the "sneep" tool from Sun.

Sun Sneep - Serial Number in EEPROM

Sneep provides a persistent, software-accessible Chassis Serial Number (CSN) for virtually all Sun Solaris hardware platforms. Sneep uses the system EEPROM for storage of the Chassis Serial Number and any other important user-defined data such as asset, contract, or location information. The presence of the software-accessible serial number and other service-related information can significantly simplify activities related to system service and asset management.

Sneep can keep the serial and other asset information right in the eeprom
where it's handy, protected, and stays associated with the machine,
and it gives you easy access to it in software.

Whenever possible, sneep gets the serial from the machine from any of several different data sources and commands. If sneep cannot find it, it depends on you to supply it after your trip to the data center.

BTW-
some of the newer Sun machines do provide software access to the true serial number,
like the SF3800-6800, the SF12K/SF15K, and newer . Most of those keep the serial
in the System Controller or the ALOM processor, and getting it still takes some work,
but at least it is possible.
Sneep is definitely the easiest thing to use.
Once you have the serial number, sneep will keep it safe and handy.

sneep sounds like an interesting option. Here is another thread on this subject which mentions the serialid program.

try iostat -E

iostat -E is great for getting the serial number of the individual drives, but sometimes (like to place a service call on a storage array) you need the serial number of the overall storage unit.

There is a need for a safe and conveniently accessible place to put this kind of information. For several reasons, having it in a file in the filesystem is less than ideal, and keeping it somewhere off of the system has even more drawbacks.

This is not to say that these commonly-used methods for tracking this information are not workable or useful, but sneep has some unique characteristics which make it especially suitable for this kind of task.

Something has to keep that information and since everything can be changed out, i.e. motherboard, chips, etc., the serial number either has to be entered in manually or put on the chassis. Guess which one? That serial number is like anything you can purchase in a store, a tracking number to show where and when it was manufactured so they can correlate issues with the manufacturing process, i.e. a bunch of bad chips, drives, etc.

If you use snmp to monitor the server, you can also use one of those fields to enter the SN on. And to better the reading process, keep that packing slip when you get the server because the number and the original part list is on it. Write the name of the server on that piece of paper, for backup, along with entering it in your asset db.

This was true in 2003 when it was posted.
In 2008, quite a few of the newer Sun machines do report the chassis serial number in the output of prtdiag -v ; generally at the end.

This is one of the places that sneep looks for the serial.

The serial that you see in the OBP banner is just the hostid in decimal . It is (usually) related to the ethernet MAC address.

On some Sun platforms, it is possible to get the serial from the command line, but there are several different ways to do it.
The simplest way is to let sneep hunt it down for you .
If your machine doesn't know its serial number, you can tell sneep what it is, and sneep will keep track of it for you after that.

It will also track other useful information like rack location, contract number, or whatever you want.
See the sneep download page for more information.

... and why would you do init 0 before pressing stop-A? You either shut the machine graciously with init 0, or you halt it with stop-A.
... and why do have keyboards attached to servers?

The serial that pops up in the banner is not the serial number of the server

it is now possibel with solaris 10:

#ipmitool fru

and in the output check the serial for the chassis type:

FRU Device Description : mb.fru (ID 4)
Chassis Type : Rack Mount Chassis