Operating System - HP-UX
1830935 Members
2270 Online
110017 Solutions
New Discussion

Re: processor count using adb in vPar environment

 
Tim Nelson
Honored Contributor

processor count using adb in vPar environment

For the longest time I have been using the below to retrieve the number of processors on a system for reporting.
echo "runningprocs/D"|adb -k /stand/vmunix /dev/mem

In a vPar environment with ICOD this reports all procs minus the two bound to the other vPar.

Is there another kernel var that can be used to report the current number of processors active in a vPar I only see runningprocs in /usr/include/sys/ki_calls.h ??

5 REPLIES 5
Robert-Jan Goossens
Honored Contributor

Re: processor count using adb in vPar environment

Tim,

How about the vparstatus command?

Regards,
Robert-Jan
Tim Nelson
Honored Contributor

Re: processor count using adb in vPar environment

That is where I was headed next if no answer to using adb.

Note:
Also noticed adb hangs on one partition and not the other.

Using adb64 works for some items but not others.

Don Morris_1
Honored Contributor

Re: processor count using adb in vPar environment

I don't think so -- and I wouldn't recommend it anyway. Reading kernel internal variables is a good way to have stuff break on you between patches/releases in the first place.

You can get this information from pstat, attaching a C program to do so.
Tim Nelson
Honored Contributor

Re: processor count using adb in vPar environment

Here is some more info relating to adb failing/hanging in a vpar environment. KnowledgeBase DOC. 4000067733

adb fails/hangs in vPar as it has trouble accessing the higher memory region that the vPar > 1 runs in. Aquire the new ADB or use /dev/kmem instead of /dev/mem
Alzhy
Honored Contributor

Re: processor count using adb in vPar environment

vparstatus|awk 'NF==9 {print $0}'|awk '{print $1,$4,$5}'|while read vpar
c1 c2;do
printf " %12s %4d cpus\n" $vpar $((c1+c2))
done
Hakuna Matata.