Get detailed Solaris memory information with prtdiag

Contributor Icon Contributed by qmchenry Date Icon November 15, 2005  
Tag Icon Tagged: Solaris system administration

A simple command will provide detailed information about the specific memory configuration of a Sun server, information such as the sizes and locations of memory banks. This can prevent cracking open the case and the associated downtime.


The [b]prtdiag[b] command displays useful information about the processors, IO devices, and memory attached to the system. The only trick is finding the program. It lives under the /usr/platform directory in a subdirectory corresponding to the hardware platform on which it is running. If you change directory to /usr/platform and look at the directory listing, you’ll see a product catalog of Sun hardware and some generic platform types (like sun4u). Identify the platform you are on (uname -i will work nicely), change into that directory, and then into the sbin subdirectory there. For example, on a Sun V210, the path would be /usr/platform/SUNW,Sun-Fire-V210/sbin. Run the command as ./prtdiag (piping it through more wouldn’t hurt). Here is a snippet of output related to memory:

Bank Table:
-------------------------------------------------------
Physical Location
ID ControllerID GroupID Size Interleave Way
-------------------------------------------------------
0 0 0 1GB 0
16 1 0 1GB 0

In this system, two banks of memory are present, each 1GB in size. If you are tasked to determine what is needed to upgrade the memory in a Sun box, you have what you need. The output of uname -i and the current memory config.

Previous recipe | Next recipe |
 
  • Anonymous
    You could just shorten it to: /usr/platform/`uname -i`/sbin/prtdiag :D
  • Anonymous
    If you want to completely remove a zone called 'testzone' from your system, login to the global zone and become root. The first command is the opposite of the 'install' option of zoneadm and deletes all of the files under the zonepath:

    zoneadm -z testzone uninstall

    At this point, the zone is in the configured state. To remove it completely from the system use:

    zonecfg -z testzone delete

    There is no undo, so make sure this is what you want to do before you do it.
  • flexinfo
    Dont forget the -v at the end for a more verbose output!
  • JD
    This doesn't work on the T1000 boxes.
blog comments powered by Disqus