8

Our SPARC server is running Sun Solaris 10; I would like to find out the actual number of processors and the number of cores for each processor.

The output of psrinfo and prtdiag is ambiguous:

$psrinfo -v
Status of virtual processor 0 as of: dd/mm/yyyy hh:mm:ss
  on-line since dd/mm/yyyy hh:mm:ss.
  The sparcv9 processor operates at 1592 MHz,
        and has a sparcv9 floating point processor.
Status of virtual processor 1 as of: dd/mm/yyyy hh:mm:ss
  on-line since dd/mm/yyyy hh:mm:ss.
  The sparcv9 processor operates at 1592 MHz,
        and has a sparcv9 floating point processor.
Status of virtual processor 2 as of: dd/mm/yyyy hh:mm:ss
  on-line since dd/mm/yyyy hh:mm:ss.
  The sparcv9 processor operates at 1592 MHz,
        and has a sparcv9 floating point processor.
Status of virtual processor 3 as of: dd/mm/yyyy hh:mm:ss
  on-line since dd/mm/yyyy hh:mm:ss.
  The sparcv9 processor operates at 1592 MHz,
        and has a sparcv9 floating point processor.

_

$prtdiag -v
System Configuration: Sun Microsystems  sun4u Sun Fire V445
System clock frequency: 199 MHZ
Memory size: 32GB
==================================== CPUs ====================================
               E$          CPU                    CPU
CPU  Freq      Size        Implementation         Mask    Status      Location
---  --------  ----------  ---------------------  -----   ------      --------
0    1592 MHz  1MB         SUNW,UltraSPARC-IIIi    3.4    on-line     MB/C0/P0
1    1592 MHz  1MB         SUNW,UltraSPARC-IIIi    3.4    on-line     MB/C1/P0
2    1592 MHz  1MB         SUNW,UltraSPARC-IIIi    3.4    on-line     MB/C2/P0
3    1592 MHz  1MB         SUNW,UltraSPARC-IIIi    3.4    on-line     MB/C3/P0

_

$more /etc/release
                       Solaris 10 8/07 s10s_u4wos_12b SPARC
           Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                            Assembled 16 August 2007
                          Patch Cluster - EIS 29/01/08(v3.1.5)

What other methods can I use?

EDITED:

It looks like we have a 4 processor system with one core each:

$psrinfo -p
4

_

$psrinfo -pv
The physical processor has 1 virtual processor (0)
  UltraSPARC-IIIi (portid 0 impl 0x16 ver 0x34 clock 1592 MHz)
The physical processor has 1 virtual processor (1)
  UltraSPARC-IIIi (portid 1 impl 0x16 ver 0x34 clock 1592 MHz)
The physical processor has 1 virtual processor (2)
  UltraSPARC-IIIi (portid 2 impl 0x16 ver 0x34 clock 1592 MHz)
The physical processor has 1 virtual processor (3)
  UltraSPARC-IIIi (portid 3 impl 0x16 ver 0x34 clock 1592 MHz)
Adrian
  • 229
  • 2
  • 4
  • 12

7 Answers7

17

The command psrinfo -pv is the command you are looking for. It gives you the number of physical cpus plus the count of virtual processor per physical processor.

For example on a V880 it looks like this:

The physical processor has 1 virtual processor (0)
  UltraSPARC-III+ (portid 0 impl 0x15 ver 0x23 clock 900 MHz)
The physical processor has 1 virtual processor (1)
  UltraSPARC-III+ (portid 1 impl 0x15 ver 0x23 clock 900 MHz)
The physical processor has 1 virtual processor (2)
  UltraSPARC-III+ (portid 2 impl 0x15 ver 0x23 clock 900 MHz)
The physical processor has 1 virtual processor (3)
  UltraSPARC-III+ (portid 3 impl 0x15 ver 0x23 clock 900 MHz)
The physical processor has 1 virtual processor (4)
  UltraSPARC-III+ (portid 4 impl 0x15 ver 0x23 clock 900 MHz)
The physical processor has 1 virtual processor (5)
  UltraSPARC-III+ (portid 5 impl 0x15 ver 0x23 clock 900 MHz)
The physical processor has 1 virtual processor (6)
  UltraSPARC-III+ (portid 6 impl 0x15 ver 0x23 clock 900 MHz)
The physical processor has 1 virtual processor (7)
  UltraSPARC-III+ (portid 7 impl 0x15 ver 0x23 clock 900 MHz)

Hope that helps. :-)

EDIT

A multicore machine has e.g. this output

The physical processor has 4 virtual processors (0-3)
  SPARC64-VI (portid 1024 impl 0x6 ver 0x93 clock 2150 MHz)
The physical processor has 4 virtual processors (8-11)
  SPARC64-VI (portid 1032 impl 0x6 ver 0x93 clock 2150 MHz)
chrw
  • 1,041
  • 5
  • 11
  • And a T1000 looks like: The physical processor has 16 virtual processors (0-15) UltraSPARC-T1 (cpuid 0 clock 1000 MHz) – slovon Nov 17 '09 at 14:19
  • And an X4170 looks like: The physical processor has 8 virtual processors (0-7) x86 (chipid 0x0 GenuineIntel family 6 model 26 step 5 clock 2267 MHz) Intel(r) Xeon(r) CPU E5520 @ 2.27GHz – slovon Nov 17 '09 at 14:21
3

You can check the number of physical processors using the psrinfo -p command.

root@sunt2000:/ # uname -a SunOS sunt2000 5.10 Generic_139555-08 sun4v sparc SUNW,Sun-Fire-T200

Checking the number of physical processors

root@sunt2000:/ # psrinfo

-p 1

Verbose output from the same command above.

root@sunt2000:/ # psrinfo -vp

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

UltraSPARC-T1 (chipid 0, clock 1200 MHz)

Below is a Sun Fire V445 that has the UltraSPARC IIIi and it is single core.

root@sunv445:/ # uname -a

SunOS sunv445 5.10 Generic_120011-14 sun4u sparc SUNW,Sun-Fire-V445

root@sunv445:/ # psrinfo

0 on-line since 11/05/2008 04:27:24

1 on-line since 11/05/2008 04:27:24

2 on-line since 11/05/2008 04:27:16

It has 3 physical processors.

root@sunv445:/ # psrinfo -p

3

I believe only UltraSPARCs IV are dual core. No issues with IIIi

root@sunv445:/ # psrinfo -vp

The physical processor has 1 virtual processor (0)

UltraSPARC-IIIi (portid 0 impl 0x16 ver 0x34 clock 1592 MHz)

The physical processor has 1 virtual processor (1)

UltraSPARC-IIIi (portid 1 impl 0x16 ver 0x34 clock 1592 MHz)

The physical processor has 1 virtual processor (2)

UltraSPARC-IIIi (portid 2 impl 0x16 ver 0x34 clock 1592 MHz)

setatakahashi
  • 1,367
  • 2
  • 11
  • 15
2

Total number of cores in a system is "kstat cpu_info | grep core_id | uniq | wc -l" Divide the total number of cores by the output of "psrinfo -p" to get the cores per physical processor

1

The information reported by "kstat cpu_info" can be used to work out how many processors (sockets) you have, how many cores per processor, and how many CMP threads per core.

If you don't care about the distinction between cores and CMP threads, "psrinfo -pv" will suffice.

0

There's always

dmesg

I suspect your prtdiag -v though lists the cores quite nicely in the Location field. Looks like you have a single CPU, quad core?

Michael Graff
  • 6,588
  • 1
  • 23
  • 36
  • Hmmm, That's what it looks like, but I don't believe there was ever a quad core UltraSPARC-IIIi available! – Brian Knoblauch Nov 17 '09 at 12:39
  • The Sun homepage says nothing about cores for this type of server (and CPU). I think the count of physical is 4 with one core each. But we'll see what psrinfo -pv says :-) – chrw Nov 17 '09 at 12:54
0

Not sure if it helps, but a dual-processor UltraSPARC-IIIi box shows up like this:

0    1280 MHz  1MB         SUNW,UltraSPARC-IIIi    2.4    on-line     MB/CPU0
1    1280 MHz  1MB         SUNW,UltraSPARC-IIIi    2.4    on-line     MB/CPU1
Chris S
  • 77,337
  • 11
  • 120
  • 212
Brian Knoblauch
  • 2,188
  • 2
  • 32
  • 45
-2

All wrong... You can't get the number of cores by just using a command line (to this date). Nothing in there will tell it to you directly, thought you can do some math to give you just an idea, and based on how old your box is.

You have to know your CPU cores you purchased and by looking atyour hardware specs, then from there, you can compute the threads per core. Now, sun now ships an 8-core, you can even get the same number of virtual CPUS if you have more Physical CPU on quad core vs less Physical CPU on 8-core system.

splattne
  • 28,348
  • 19
  • 97
  • 147
Jeff
  • 1
  • 1
  • 1
    You can get the number of cores today. See Solaris 11 Express. % psrinfo -pv The physical processor has 2 cores and 4 virtual processors (0-3) The core has 2 virtual processors (0 1) The core has 2 virtual processors (2 3) SPARC64-VI (portid 1024 impl 0x6 ver 0x90 clock 2150 MHz) The physical processor has 2 cores and 4 virtual processors (40-43) The core has 2 virtual processors (40 41) The core has 2 virtual processors (42 43) SPARC64-VI (portid 1064 impl 0x6 ver 0x90 clock 2150 MHz) – Jodie C Jul 13 '11 at 20:16