Getting Hardware Information in Solaris

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.

/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.

solaris, sun, unix, system administration, sysadmin

49 thoughts on “Getting Hardware Information in Solaris”

  1. 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

  2. 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

  3. 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

  4. I was trying with command prtconf but this is more userful for what I was trying to get. Thanks

  5. 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 ?

  6. 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.

  7. 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.

  8. 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?

  9. 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…

  10. 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.

  11. 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

  12. Hi,

    # eeprom | grep banner doesnt give the serial number of the system! Is there any other command in sol-9?

    Regards.

  13. 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

  14. 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.

  15. 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.

Leave a Reply

Your email address will not be published. Required fields are marked *