Getting hardware information

A few weeks ago, we had a Sun desktop that stopped giving video.  After some hardware experimentation, we determined that the video card went kaput.  So I thought it might be helpful to get some information on the video card so I could find a replacement (the story ends with a replacement costing $1200, needless to say we decided to retire the box).   So I know how to get all kinds of hardware information on Linux, but Solaris works a little differently.

A Google search lead me to a post on Life After Coffee which told me that Solaris hardware info can be found with the command /usr/platform/`uname -i`/sbin/prtdiag.   So there’s some info, but it wasn’t all that helpful.  I’m sure there has to be better sources, but I haven’t found them.  Other platforms give a lot more information.

On Linux, you can get information from the lspci, lsusb, and dmesg commands.  And the dmidecode command gives you way more information than you’ll ever need.  Want to know the status of the temperature probes on the CPU?

/usr/sbin/dmidecode | grep -A 5 Temperature

There’s several hundred lines of information to be had, depending on your hardware.

MacOS takes the cake though.  The system_profiler command is your one-stop shop for hardware information.  This includes the MAC address of your network cards, something other Unix-like OSes make you do an `ifconfig` to find.  Regardless of how you have to find it, you can parse this hardware information to build an inventory database.  Hooray!

Leave a Reply

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