psrinfo – Find number of Physical & Virtual Processors in Solaris 10

In Solaris 10, if you want to find the processor type and the number of physical processors installed on the system and the number of Virtual Processors available on the system then the psrinfo command does job for you.

To simply display the number of Physical processors, simply run the command with the -p option as follows:

root@sunserver # psrinfo -p
2

where 2 implies that there are 2 physical processors installed on the system.

If you would like to check the number of Virtual Processors on each of these Physical processors then type the command with the “-pv” arguement as follows:

root@ server:/root$ uname -a

SunOS server 5.10 Generic_137111-02 sun4v sparc SUNW,SPARC-Enterprise-T5120

root@server:/root$ psrinfo -pv

The physical processor has 32 virtual processors (0-31)

  UltraSPARC-T2 (cpuid 0 clock 1165 MHz)

The above indicates that there was only one physical processor (UltraSPARC-T2) on the T5120 server which has 32 Virtual processors. Each virtual processor is an entity with its own interrupt ID, capable of executing independent threads.

In simple terms, the number of Virtual Processors supported by a physical CPU is

“Number of Core” x “Number of threads”

For instance, the above is on a T5120 server with the UltraSPARC-T2. This CPU  has 4 cores and each core can support 8 threads and that gives us 32 Virtual processors.

The number of Virtual processors on a Server is simply the total Virtual processors supported on each of the physical processor.

In the following T5140 server there are 2 Physical UltraSPARC-T2+ processors with 6 cores, each supporting 8 threads which means we get 48 Virtual processors per Physical processor and hence a total of 96 Virtual processors (sum of VPs on individual processors) for the server:

root@ bserver:/root$ uname -a

SunOS bserver 5.10 Generic_137111-02 sun4v sparc SUNW,T5140

root@ bserver:/root$ psrinfo -pv

The physical processor has 48 virtual processors (0-23 32-55)

  UltraSPARC-T2+ (cpuid 0 clock 1167 MHz)

The physical processor has 48 virtual processors (64-71 80-119)

  UltraSPARC-T2+ (cpuid 64 clock 1167 MHz)

In earlier versions of Solaris, the -p arguement is not supported and hence wouldn’t provide this summarised output on the counts of the physical and Virtual CPUs.

14 thoughts on “psrinfo – Find number of Physical & Virtual Processors in Solaris 10”

  1. So, there is no way to find the actual number of cores on the cpu? I mean without going through ‘uname -a’ and then googling up for the processors data sheet.

  2. Personally, I prefer to simply use uname -X to get the total cores from NumCPU. kstat cpu_info is just a bit too verbose.

  3. Why NumCPU=32 for the command output uname -X in T5220 server?.
    Where as actual number of processor is one

  4. Dear,
    i have a question about this server, can i close an ethernet port like ETH1 with a command? please if you have an answer feedback to me

  5. thanks this is helpful.

    i just have a query. when i do a “psrinfo -pv”, i get:

    The physical processor has 1 virtual processor (0)
    UltraSPARC-III+ (portid 0 impl 0x15 ver 0xb1 clock 1200 MHz)
    The physical processor has 1 virtual processor (2)
    UltraSPARC-III+ (portid 2 impl 0x15 ver 0xb1 clock 1200 MHz)

    the numbers in parenthesis (after the “virtual processor” words) isn’t they supposed to be number 0 and 1 respectively?

  6. To Rino: I think the number in parentheses is the chip_id, it also shows in the kstat cpu_info (if you have that command available). I suppose it’s desirable to have your chip_id values in sequential order, but it’s probably not necessary.

Leave a Comment

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