Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count number of CPU's on HPUX from a c program 1

Status
Not open for further replies.

naki76

Programmer
Oct 22, 2002
1
GB
Hello-
I am attempting to count the number of processors on any given HPUX machine from within a c program. This could also be brought in from a script which runs the program. The program/script cannot be run from root access and thus I do not know if this is possible.
 
You can see how many processors with an ioscan, try something like

#ioscan -kfn | grep processor | wc -l

I'm not sure(no system to test), but maybe there is a class for processor, i.e

#ioscan -kfnC processor | wc -l

Hope this helps
Clare



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top