Here’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.
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.
49 thoughts on “Getting Hardware Information in Solaris”
wow that’s useful! thanks.
Damned useful! Love the “non root” part.
Quick and helpful. Thanks!
prtdiag dont work in solaris i86pc, how is the equivalent?
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.
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.
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.
Under Solaris 10 (SPARC), the path to this is just:
I exactly got the information, that i wanted. Thanks
I was trying with command
prtconfbut this is more userful for what I was trying to get. Thanks
This is great information!
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 ?
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.
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.
I don’t think there is a counterpart on x86, but by the looks of this there will be soon:
I don’t have a Solaris box near me to check, but is the code reported by “hostid” different from the machine serial number?
prtdiag – good tip thanks
I found prtdiag ran fine without the path but would not using the published path
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…
That was very helpful!! Thanks!
Just to confirm on Solaris x86, prtdiag is in the same location at /usr/sbin/prtdiag and runs find non-root.
Thats what I needed.. Thanks a lot.
Superb prima!!! could you explain the output as well?
This is more useful for what I was trying to get… Thanks
thanks !!! it solves the doubt instantly
It’s helpful for me.
This is insanely useful! It should have shown the hard drive size and info too, though.
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.
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
# eeprom | grep banner doesnt give the serial number of the system! Is there any other command in sol-9?
I believe sneep is what your after….
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 firstname.lastname@example.org
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 .
thanx a lot, very useful command i.e wat i required.
Useful, very useful, thanks
“non root” part roxx, THX very much !
Super.. to find serial name, can’t you just do $hostid
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
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.
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.
Thanks for the command.
How about finding the Hardware Model from the cli?
Good grief….nevermind, its the first line returned from prtdiag
To get serial number use
eeprom | grep ChassisSerialNumber
“On x86 is uses smbios and ipmi to look for the serial, as you can too.”
THANK YOU that’s what I needed!