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