How can I find out how much RAM is installed in my Solaris server?
How do I know how many CPUs/cores are in my Solaris server?
These are two questions you may have asked yourself maybe out of curiosity or perhaps to provide information to colleagues. Well, you’ll be relieved to hear that it is quite simple with Solaris (I’m currently using Solaris 10 but this can be used in older and newer versions).
One can use the same command to answer both these questions, that being prtdiag. This will output the details on each CPU present, the configuration of memory (RAM) and also information on I/O cards found.
The first few rows of information displayed tells the model of the server (see Figure 1), in my case it is a Sun Fire v490. Also shown are the system clock speed and the total memory size. Typically this figure, 16Gb, would be a good enough answer but by reviewing the output further more detail is presented.

prtdiag
Figure 1

Here we can see that I have two processors installed, both running at 1.8 GHz (Figure 2).
prtdiag - CPUs
Figure 2

Detailed information about the configuration of the installed memory (Figure 3).
prtdiag - Memory
Figure 3

Now, the keen-eyed reader may have noticed that in Figure 2 there are two values per CPU; 0, 16 and 2, 18. This is because my two CPUs are dual core. The cores can be listed individually using psrinfo, see Figure 4 below. They have been online since 11:44 on the 20th March 2011, which is when the physical server was last restarted.
psrinfo
Figure 4

By passing the -v switch to psrinfo, the information is laid out in an easier to read format and also supplemented by confirmation of processor type and notification that it has a floating point processor.
For completion, here is the last part of the prtdiag output, Figure 5 – the IO Cards.
prtdiag - IO Cards
Figure 5

With the commands referenced in this article you can now confidently answer the questions posed earlier.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.