How to find core density(physical cores/physical processor) (3820 Views)
Reply
Occasional Contributor
Symantec
Posts: 3
Registered: ‎10-23-2010
Message 1 of 9 (3,820 Views)

How to find core density(physical cores/physical processor)

I could see similar posts on this forum, but I could not find required information. I am interested in finding the number of cores per physical processor (need not to consider hyperthreading) across all 11.23 and 11.31 HP-UX machines. We are using Perl scripts to discover this information and hence it would be really helpful if I can find CLI's or Perl/shell scripts. I assume "ioscan -fk | grep processor" would give the available physical core count on the host. Please correct me if my assumption is incorrect.

To find find core density, I need to get available physical processor count on the host(along with core count). But, I could not find any CLI or script to get this information on all 11.23 and 11.31 hosts. I have tried "machinfo" which would give cores per socket in CPU info: section. But on some of the 11.23 hosts, "machinfo" is not available and on some other hosts getting some exception(failed to retrieve CPU info) while invoking "machinfo".  

Acclaimed Contributor
Dennis Handly
Posts: 25,277
Registered: ‎03-06-2006
Message 2 of 9 (3,816 Views)

Re: How to find core density(physical cores/physical processor)

(The correct boards are under HP-UX.  I asked the moderators to move this topic.)

 

>I am interested in finding the number of cores per physical processor (need not to consider hyperthreading)

 

Then the answer is always 1.  Each core is a processor.

Now if you are talking about cores per socket, then it depends on the CPU model.

 

>I assume "ioscan -fk | grep processor"

 

You can use -C to speed this up.

 

>But on some of the 11.23 hosts, "machinfo" is not available

 

Only if the sysadmin removed it.

Honored Contributor
Doug O'Leary
Posts: 815
Registered: ‎05-25-2005
Message 3 of 9 (3,803 Views)

Re: How to find core density(physical cores/physical processor)

>>Only if the sysadmin removed it.

 

Or, it's a PA-RISC sysem...

 

Doug


------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Honored Contributor
Doug O'Leary
Posts: 815
Registered: ‎05-25-2005
Message 4 of 9 (3,799 Views)

Re: How to find core density(physical cores/physical processor)

Hey;

 

I've recently tried going through this exercise myself.  To quote a disgraced former president, "I feel your pain".

 

As you've found, machinfo only works on ia64 systems.  PA-Risc systems seem to be a bit harder to find this ifo.

 

A healthy bit of research indicated that *all* rp3440 and rp4440s were dual core.  Another possibility that I haven't explored too far:

 

# echo "sc product cpu;il" | cstm > /tmp/cstm.out

# grep "CPU Number" /tmp/cstm.out

CPU Number: 0     CPU Slot Number 0

CPU Number: 1     CPU Slot Number 0

CPU Number: 2     CPU Slot number 1

CPU Number: 3     CPU Slot number 1

 

To me, that indicates dual core cpus; however, I haven't had a chance to independently verify that in any way.

 

Hope that helps.

 

Doug


------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Honored Contributor
Robert_Jewell
Posts: 1,239
Registered: ‎06-26-2001
Message 5 of 9 (3,784 Views)

Re: How to find core density(physical cores/physical processor)

> machinfo only works on ia64 systems.

 

machinfo also works on any 11.31 system.

 

Also, note that that the only processor that can run HP-UX that has more than two cores per socket is the Tukwila (Itanium 9300 series) and is currently running on the i2 series blades and the Superdome2.  Anything would be single or dual core.

 

Not helping your original question I am sure.  Another way to see total processors or cores is 'sar -M'.

 

-Bob

Occasional Visitor
Santosh_K
Posts: 2
Registered: ‎08-29-2011
Message 6 of 9 (3,770 Views)

Re: How to find core density(physical cores/physical processor)

Thanks Doug and Bob.  But still, I am unable resolve the issue.

 

sar -M
sar: Can't open /var/adm/sa/sa30

 

#echo "sc product cpu;il" | cstm > /tmp/cstm.out

 

This also fails on few IA hosts with error

cstm>sc product cpu;il
                    ^-- (InfoLog) is currently disabled. --

cstm>#.

 

I cannot make any assumption that InfoLog would be enabled on the host where my script get executed.

 

Somehow I could manage to get this information on all other plaforms except HP-UX.

 

~Santosh 

 

Honored Contributor
Robert_Jewell
Posts: 1,239
Registered: ‎06-26-2001
Message 7 of 9 (3,751 Views)

Re: How to find core density(physical cores/physical processor)

Sorry...should have been more specific.  Run 'sar -M 1 1'  (sar expects interval and time delay options as its a metrics/performance tool.   For example, the following is showing 8 processors:

 

HP-UX rx7640a B.11.31 U ia64    08/30/11

08:53:40     cpu    %usr    %sys    %wio   %idle
08:53:41       0       0       0       0     100
               1       0       0       0     100
               2       0       1       1      98
               3       0       0       0     100
               4       0       0       0     100
               5       0       0       0      99
               6       0       0       0     100
               7       0       0       0     100
          system       0       0       0     100

 

 

 

Occasional Visitor
Santosh_K
Posts: 2
Registered: ‎08-29-2011
Message 8 of 9 (3,721 Views)

Re: How to find core density(physical cores/physical processor)

Looks like 'sar -M 1 1' lists available core information. I am using ioscan to get this information.

Now I need to know either phycical processor/socket count or core density.

Trusted Contributor
mvpel
Posts: 271
Registered: ‎01-11-2009
Message 9 of 9 (2,650 Views)

Re: How to find core density(physical cores/physical processor)

Under HP-UX 11i v3 (and maybe 2) the mpctl() function call has the MPC_GETNUMCORES_SYS, MPC_GETNUMSPUS_SYS, and the MPC_GETNUMSOCKETS_SYS operation.

 

The first gets the number of logical cores, which is twice the number of physical cores on Itanium systems with Intel Hyper-Thread Technology turned on; the second gets the number of physical processor cores; and the third one returns the number of sockets.

 

Only GETNUMSPUS is supported on 11i v1, not GETNUMSOCKETS, but only the PA-8800 and PA-8900 processors were dual-core, so if you can identify that you're on a PA-RISC system and running either one of those two processors, you'll know that your number of sockets is half the return value of mpctl(MPC_GETNUMSPUS_SYS, 0, 0). The good news is that there will never be a new PA-RISC processor so you can just do a case statement and forget it.

 

The cstm "sc product cpu; il" command will eventually show the following: "PA 8500-8500 CPU 2.1" (from my B1000 workstation), but I'm not sure yet how to do that in C - I suspect it has something to do with probing IO modules since that's the section where the processor info appears.

 

Here's the 11i v3 man page for mpctl(), which I've attached in case the link goes dead in a few years:

http://h20000.www2.hp.com/bc/docs/support/SupportManual/c02264569/c02264569.pdf

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.