Getting Hardware Information in Solaris
Categories: Information Technology, System Administration, UNIXHere’s a quick way to find out what hardware is installed in your Solaris system, including RAM, CPUs, PCI cards, and external devices. The output will usually include the size of each memory chip in the system.
The one trick to using this command is to make sure you use the backtick instead of a single quote around the uname -i. The backtick is typically shift tilde and forces the command between the backticks to be executed and substituted in to that part of the command.
/usr/platform/`uname -i`/sbin/prtdiag
prtdiag actually displays system diagnostic information. I’ve used this on Solaris 7 through 10. The best parts is you do not even need to be root to execute this.
For more info on prtdiag check out the man page.


March 28th, 2006 at 6:52 pm
wow that’s useful! thanks.
April 23rd, 2006 at 9:19 pm
Damned useful! Love the “non root” part.
Cheers.
May 18th, 2006 at 10:04 am
Quick and helpful. Thanks!
May 26th, 2006 at 7:54 pm
prtdiag dont work in solaris i86pc, how is the equivalent?
May 29th, 2006 at 3:45 pm
Jose, I’m afraid I don’t really know. I don’t even have Intel Solaris installed anywhere to check. Sorry. I’d say ask Sun support if you have a contract with them. Good luck.
Jon
June 2nd, 2006 at 6:10 am
Hello .. Is there another equivalent command in Solaris of prtdiag? It’s not running in my system as I ma not logged in as root.
rgds
June 3rd, 2006 at 3:18 pm
Bib, I don’t know of any other command that will give you all this info. You might want to ask your sys-admin about this. They may have disabled it for some reason.
Jon
July 3rd, 2006 at 5:17 pm
Under Solaris 10 (SPARC), the path to this is just:
/usr/sbin/prtdiag
July 13th, 2006 at 4:00 am
I exactly got the information, that i wanted. Thanks
July 21st, 2006 at 5:36 am
I was trying with command
prtconfbut this is more userful for what I was trying to get. ThanksSeptember 11th, 2006 at 10:02 am
This is great information!
Thanks!
September 13th, 2006 at 9:50 am
Hi,
This is usful, but was wondering if anbody knew how to get the serial number of the box by running a command from the cl ?
September 13th, 2006 at 8:21 pm
Fanco,
It doesn’t sound like there’s any way to find the serial without physically going to the machine. It looks like there are some utilities which will store them on the system for you, but you still need to enter them from the case first.
If anyone does have a solution please post a response. If there’s a way I’d love to know how.
September 14th, 2006 at 11:24 am
Its work just fine on a SPARC Box, but I did not get any info on x86.
if some one can find any utill that can do it, I will more than happy.
thanks Jon.
September 19th, 2006 at 7:36 pm
Emanuel,
I don’t think there is a counterpart on x86, but by the looks of this there will be soon:
http://blogs.sun.com/mws/entry/smbios_support_for_solaris_x86
September 28th, 2006 at 2:47 pm
Jon,
I don’t have a Solaris box near me to check, but is the code reported by “hostid” different from the machine serial number?
September 29th, 2006 at 5:27 am
prtdiag - good tip thanks
September 29th, 2006 at 5:29 am
I found prtdiag ran fine without the path but would not using the published path
October 25th, 2006 at 1:18 am
I agree with Mike Smith… prtdiag is in the default path already…
Now if I could just find an easy way to identify the SCSI adapter and disk I added to the system (Solaris 10 on x86 with IDE drive) to show up so I can add it to the file system…
November 15th, 2006 at 4:49 pm
That was very helpful!! Thanks!
December 8th, 2006 at 3:07 pm
Just to confirm on Solaris x86, prtdiag is in the same location at /usr/sbin/prtdiag and runs find non-root.
February 23rd, 2007 at 1:07 pm
Thats what I needed.. Thanks a lot.
March 12th, 2007 at 3:30 pm
Thanks
April 3rd, 2007 at 10:45 am
Superb prima!!! could you explain the output as well?
April 18th, 2007 at 12:48 am
This is more useful for what I was trying to get… Thanks
May 4th, 2007 at 4:42 am
thanks !!! it solves the doubt instantly
May 21st, 2007 at 9:17 pm
It’s helpful for me.
Thanks.
May 24th, 2007 at 12:21 pm
This is insanely useful! It should have shown the hard drive size and info too, though.
June 6th, 2007 at 6:56 am
You get to see a Serial number of the box at bootup if you watch the output on a console. I don’t think this matches the Serial number seen on any physical label on the outside of the box.
I don’t know any other way to get the Serial number other than a reboot.
June 23rd, 2007 at 6:11 am
To see the serial number, you can use the eeprom command, most of the times it is registered in the banner var
# eeprom | grep banner
Regards
August 14th, 2007 at 6:51 pm
Hi,
# eeprom | grep banner doesnt give the serial number of the system! Is there any other command in sol-9?
Regards.
October 30th, 2007 at 7:59 am
I believe sneep is what your after….
http://www.sun.com/download/products.xml?id=4304155a
November 19th, 2007 at 6:02 pm
The serial reported on a Sun in the boot banner is just the hostid in decimal and is not related to the actual chassis serial number (CSN)
On older Sun platforms, the only source for the CSN is the tag on the chassis or the “yellow sheet” that ships with the box.
To make it software-accessible, you might want to use sneep , as was mentioned already.
Sneep can also store and protect almost any other platform-specific data that you might need, like Asset tag or contact information.
Many of the newer platforms include some kind of built-in CSN support, but Sun is still (as of 11/2007) working on a standard way to get at it; some use prtdiag, some use SMBIOS or IPMI or FRUID, some put it in the LOM or ILOM or other System Controller.
Sneep 1.79 knows how to get at some of these, and future updates will try to improve on this and track the upcoming standard as it gets defined and implemented.
As of 11/2007, the sneep download at http://www.sun.com/download/products.xml?id=4304155a is 1.76
and it doesn’t know anything that you haven’t told it
(unless sneep can find the serial in your explorer or CST configuration)
If you have to have 1.79 (which also fixes a problem with eeprom handling by Veritas vxfs 4.1 and above), make a request on sneep-support@sun.com
Right now the best solution is to use sneep and to tell it your serial number once. Sneep will put it in the eeprom (on SPARC) protect it from loss or damage.
It does the best it can on x86, but there is no true eeprom.
At least you have a simple, standard way to get the serial back .
sneep-support@sun.com
December 3rd, 2007 at 6:00 am
thanx a lot, very useful command i.e wat i required.
January 4th, 2008 at 11:04 am
Useful, very useful, thanks
January 21st, 2008 at 8:00 pm
“non root” part roxx, THX very much !
April 14th, 2008 at 11:34 am
Super.. to find serial name, can’t you just do $hostid
May 7th, 2008 at 10:49 am
As of 5/2008, Sneep has been updated and now can find the serial number on many Solaris platforms, including x86 .
On x86 is uses smbios and ipmi to look for the serial, as you can too.
Sneep 1.92 (and beyond) should be available from
http://www.sun.com/sneep
May 14th, 2008 at 5:52 am
If you run a explorer, then you will find your serial number in the
/opt/SUNWexplo/output/explorer.`hostid`.`hostname`…./README file (System Serial number)
Have a nice day.
July 4th, 2008 at 4:40 am
Quite handy!
Thx
August 18th, 2008 at 7:57 pm
Jacques - you will only find the Serial number in the README if you have provided it as a result of the installation questionnaire. Info found in the /opt/SUNWexplo/output/explorer.`hostid`.`hostname`…./defaults file.