29Jul/100
Numbers of CPU Cores in Solaris 10
The psrinfo is a tool that reports the numbers of physical processors and numbers of virtual processors. Most unfortunate, it is not possible to find out numbers of cores in the Solaris 10 psrinfo output. Below output shows that my configuration has got 2 physical processors and total 16 virtual processors.
alper:~ $ psrinfo -vp The physical processor has 8 virtual processors (0-7) SPARC64-VII (portid 1024 impl 0x7 ver 0x91 clock 2400 MHz) The physical processor has 8 virtual processors (8-15) SPARC64-VII (portid 1032 impl 0x7 ver 0x91 clock 2400 MHz)
To find out the numbers of cores, you need analyze the kstat output. The below output shows that virtual CPU instance: 0 belongs to cpu core 0 (core_id line in output).
alper:~ $ kstat cpu_info
module: cpu_info instance: 0
name: cpu_info0 class: misc
brand SPARC64-VII
chip_id 1024
clock_MHz 2400
core_id 0
cpu_fru hc:///component=/MBU_A/CPUM0
cpu_type sparcv9
crtime 126.7569109
current_clock_Hz 2400000000
device_ID 279287011836295
fpu_type sparcv9
implementation SPARC64-VII (portid 1024 impl 0x7 ver 0x91 clock 2400 MHz)
snaptime 10650736.0805644
state on-line
state_begin 1269762960
supported_frequencies_Hz 2400000000
Therefore, it is possible to find out the number of cores by counting numbers of unique core_id in `kstat cpu_info` command.
alper:~ $ kstat cpu_info | grep core_id | awk '{ print $2}' | uniq | wc -l
8
Briefly, my configuration has got 2 physical processors, 8 cores (4 in each physical processor), and 16 virtual processors (2 in each core).