Operating System - HP-UX
1833778 Members
2416 Online
110063 Solutions
New Discussion

CPU information available?

 
SOLVED
Go to solution
Reggie Chang
Frequent Advisor

CPU information available?

Hello,

I wonder if there is a file in HP (10.20 OS)
which keeps the CPU information? (I know that
linux has a file /proc/cpuinfo.)

Or is there a command to find out total number
of CPU? Actually I need to run a system command in a FORTRAN program to detect the total number of CPU. Command top does provide that info. (At least on linux, but somewhat inconvenient. We only have one CPU on our HP machine and the info is not clear.)

All kind of info (except top) is appreciated.

Best regards,

Reggie
4 REPLIES 4
someone_4
Honored Contributor

Re: CPU information available?

Patrick Wallek
Honored Contributor

Re: CPU information available?

Have a look at this thread. It should answer your questions.

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xed8006295e00d6118ff40090279cd0f9,00.html
James R. Ferguson
Acclaimed Contributor
Solution

Re: CPU information available?

Hi Reggie:

I count the number of CPUs this way:

# sar -Mu 1 1 | awk 'END {print NR-5}'

Regards!

...JRF...
Bill Hassell
Honored Contributor

Re: CPU information available?

You don't need to run a system command to get the information in FORTRAN, just use pstat (see the man page). Another way to see hardware is ioscan. For processors:

ioscan -kfC processor

To count them:

ioscan -kfC processor | grep -c processor


Bill Hassell, sysadmin