Operating System - HP-UX
1819814 Members
4155 Online
109607 Solutions
New Discussion юеВ

Re: How to get Number of cpu cores and cpu thread on HP itanium

 
Chanthu
New Member

How to get Number of cpu cores and cpu thread on HP itanium

Hello,

I would like to know is there any command or c++ api which will give the following cpu information on HP
1. Number of physical processor
2. Number of logical processor( number of cores)
3. Number of threads (if multi threading enabled)

Thanks in advance
Chanthu
18 REPLIES 18
Torsten.
Acclaimed Contributor

Re: How to get Number of cpu cores and cpu thread on HP itanium

Try with "machinfo":

machinfo
CPU info:
1 Intel(R) Itanium 2 9000 series processor (1.4 GHz, 12 MB)
399 MT/s bus, CPU version C2
2 logical processors (2 per socket)
...

and setboot

setboot
Primary bootpath : 0/0/0/3/0.0x6.0x0 (/dev/rdisk/disk4)
HA Alternate bootpath :
Alternate bootpath : 1/0/0/3/0.0x6.0x0 (/dev/rdisk/disk5)

Autoboot is ON (enabled)
Hyperthreading : ON
: ON (next boot)
...

Hyperthreading works only with 11.31.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Sani
Frequent Advisor

Re: How to get Number of cpu cores and cpu thread on HP itanium

Hi,

1&2 use "machinfo "

3 use "glance -Z "


Hakki Aydin Ucar
Honored Contributor

Re: How to get Number of cpu cores and cpu thread on HP itanium

also issue the command for previous 11i
#ioscan -fnC processor
Emil Velez
Honored Contributor

Re: How to get Number of cpu cores and cpu thread on HP itanium


The top command shows a line for each processor the OS sees
Chanthu
New Member

Re: How to get Number of cpu cores and cpu thread on HP itanium

Hello,

Thanks for all your replays
In my machine machinfo is giving the following output. its not showing anything about cores, it shows only toatls cpu count.

CPU info:
Number of CPUs = 4
Clock speed = 1400 MHz
Bus speed = 400 MT/s
CPUID registers
vendor information = "GenuineIntel"
processor serial number = 0x0000000000000000
processor version info = 0x0000000020000704
architecture revision: 0
processor family: 32 Intel(R) Itanium 2 9000 series
processor model: 0 Intel(R) Itanium 2 9000 series
processor revision: 7 Stepping C2

setboot will shows Hyperthreading ON/OFF. but is there any way to find out the eaxct count of threads and count of cores?

Thanks in advance
Chanthu
Johnson Punniyalingam
Honored Contributor

Re: How to get Number of cpu cores and cpu thread on HP itanium

Hi Chanthu,

Please run the Nickel.script which has been provided by HP, you get more information in HTML format, very Cool and very impressive ..:)

You must run as root

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
Chanthu
New Member

Re: How to get Number of cpu cores and cpu thread on HP itanium

Hello,

Thanks for your reoplay.

I will clear my requerement here. I would like to create a c/c++ application which will claculate
1.Exact Number of physical processor
2.Exact Number of logical processor( number of cores)
3.Exact Number of threads (if multi threading enabled)

The problem with nickel script is that it will run only with root login and secondly I am getting some error messages from the script even if I run it as root.

adb: info: Option -k is deprecated.
adb: warning: Unrecognized format character - 'U'.
adb: info: Option -k is deprecated.
adb: warning: Unrecognized format character - 'D'.
adb: info: Option -k is deprecated.
adb: warning: Unrecognized format character - 'X'.
adb: info: Option -k is deprecated.
adb: info: Option -k is deprecated.
adb: warning: Unrecognized format character - 'X'.


Thanks and regards,
Chanthu

Dennis Handly
Acclaimed Contributor

Re: How to get Number of cpu cores and cpu thread on HP itanium

>I am getting some error messages from the script even if I run it as root.

See this recent thread about the same thing:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1317756
Torsten.
Acclaimed Contributor

Re: How to get Number of cpu cores and cpu thread on HP itanium

You probably running 11.23, so 4 cores of Intel 9000 CPUs means 2 dual core modules, no HT.

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Chanthu
New Member

Re: How to get Number of cpu cores and cpu thread on HP itanium

Hello,

Anybody having a c/c++ program which will return the above cpu information on HP itanium?

Thanks and regards,
Chanthu
Dennis Handly
Acclaimed Contributor

Re: How to get Number of cpu cores and cpu thread on HP itanium

>Anybody having a C/C++ program which will return the above CPU info

You can get CPU info from pstat_getprocessor(2), example 2:
http://docs.hp.com/en/B2355-60130/pstat.2.html#d0e604810
Chanthu
New Member

Re: How to get Number of cpu cores and cpu thread on HP itanium

Hi Dennis,

Thanks..

This will give total cpu count.
Is there any way to find out logical processors(cores) count and thread count on HP itanium 64. On x86 machines cpuid() will give the information. similarly any functionality available for HP itanium ?
Dennis Handly
Acclaimed Contributor

Re: How to get Number of cpu cores and cpu thread on HP itanium

>This will give total CPU count. Is there any way to find out logical processors(cores) count

CPU == core.
Have you looked at struct pst_processor to see if there are any details about the type of processor?
You should be looking at the 11.31 Release Notes if you want to see about hyperthreading.
Torsten.
Acclaimed Contributor

Re: How to get Number of cpu cores and cpu thread on HP itanium

You already have your identifier:

processor family: 32 Intel(R) Itanium 2 9000 series
processor model: 0 Intel(R) Itanium 2 9000 series
processor revision: 7 Stepping C2


Itanium 2 9000 series = dual core Montecito

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Taifur
Respected Contributor

Re: How to get Number of cpu cores and cpu thread on HP itanium

Hi Chantu,

You can check it by entering shell
shell means EFISHELL which comes after reboot the server & enter the EFI shell
shell>info all;


or from run the nickel script

#./nickel


Rgds//
Taifur
Henry_3
Occasional Contributor

Re: How to get Number of cpu cores and cpu thread on HP itanium

Hello Chanthu

I also have same question.

Do you slove this problem?

if then, plesae let me know it.

Really I want know

1. Number of physical processor
2. Number of logical processor( number of cores)

Thank you
Torsten.
Acclaimed Contributor

Re: How to get Number of cpu cores and cpu thread on HP itanium

@Henry:
Consider to open your own thread!

"machinfo" in 11.23 reports the number of cores, in 11.31 it reports the number of modules and cores per CPU. HT is only possible in 11.31; check with "setboot".

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Suraj K Sankari
Honored Contributor

Re: How to get Number of cpu cores and cpu thread on HP itanium

Hi,

Please run Nickel script

Suraj