Avatar of olegboiko
olegboiko
Flag for Afghanistan asked on

Core number on SunOs

Hi Experts,

I'm trying to identify number of cores on Solaris box by using "kstat -p cpu_info" command.

Approach is based on counting different "core_id" per "chip_id" in output

However now I have a machine where "core_id" is completely missed in the output.

"uname -a" says it is SunOs 5.9

Do you know the reason "core_id" is not present in output?
Are there other reliable ways to calculate core per physical processor numbers?

Thanks,
Oleg
Operating SystemsComponents

Avatar of undefined
Last Comment
jgiordano

8/22/2022 - Mon
jgiordano

psrinfo -v

Should give you some processor info.
hossamshaaban

psrinfo -pv
olegboiko

ASKER
Right, but this command shows number of physical processors along with the number of virtual processors which are not necessary cores. They could also be just threads.

So, in general I don't see a way to determine number of cores per physical CPU using only this command.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
hossamshaaban

prtdiag -v
olegboiko

ASKER
Ok, this command produces the following output for CPUs


==================================== CPUs ====================================
               E$          CPU                    CPU
CPU  Freq      Size        Implementation         Mask    Status      Location
---  --------  ----------  ---------------------  -----   ------      --------
0    1503 MHz  1MB         SUNW,UltraSPARC-IIIi    3.4    on-line     MB/P0
1    1503 MHz  1MB         SUNW,UltraSPARC-IIIi    3.4    on-line     MB/P1

Open in new window


Still, number of cores is not clear here.
I tried to search over the web, is seems like there is no reliable way to identify number of cores per CPU on SunOs 5.9
ASKER CERTIFIED SOLUTION
jgiordano

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
olegboiko

ASKER
That's true. I have found somewhat more on the Web:

UltraSPARC III -- single core, no multithreading
UltraSPARC IV, IV+ -- dual core, no multithreading
UltraSPARC T1 -- 4, 6, 8 cores, 4 threads per core
UltraSPARC T2, T2+ -- 8 cores, 8 threads per core
SPARC T3 -- 8 or 16 cores, 8 threads per core
SPARC T4 -- 8 cores, 8 threads per core

There is also a line of SPARC64 processors. Does anybody knows if they are related to the above line of go separately?
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
jgiordano

try this -

 echo "`hostname` has `kstat cpu_info | grep core_id | uniq | wc -l` cores"

Open in new window

jgiordano

I just tried the kstat cpu_info on 2 servers a T2000 and a V240

the V240 has 2 physicals each with 1 core
 

and the T2000 showed 8 cores.
olegboiko

ASKER
@jgiordano -- this is a good solution, but as a I posted in the very first comment "core_id" is not present in the output.

I think the reason is that it's SunOS 5.9. SunOS 5.10 that I have in lab show "core_id" in the output of kstat.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
SOLUTION
jgiordano

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
olegboiko

ASKER
Oh, so you suggest that Solaris 9 doesn't support T chips.
I need to check this.

Thanks for an idea!
SOLUTION
jgiordano

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.