Operating System - HP-UX
1832506 Members
4931 Online
110043 Solutions
New Discussion

Re: sysinfo.h cpu state defines

 
Procnus
Frequent Advisor

sysinfo.h cpu state defines

Inside the sysinfo.h file are 5 defines for CPU state:
CPU_IDLE
CPU_USER
CPU_KERNEL
CPU_WAIT
CPU_SXBRK

I can guess the first 3, but can anyone provide some enlightenment on the last 2. I ask because when I call pstat_getprocessor in a 5 second interval I get a CPU_WAIT = 287 out of 502 and a CPU_SXBRK = 193 out of 502 timeslices.

Any help will be gratefully appreciated.

Steven
2 REPLIES 2
James R. Ferguson
Acclaimed Contributor

Re: sysinfo.h cpu state defines

Hi Steven:

CPU_WAIT is the time spent by a CPU waiting to acquire a critical resource (lock).

I suspect that CPU_SXBRK value assists in interpreting the number of task context switches versus the CPU_WAIT.

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: sysinfo.h cpu state defines

JRF got the CPU_WAIT but CPU_SXBRK I think is waiting for more memory to be allocated - sbrk(). This is from my own memory and my it may be broke.
If it ain't broke, I can fix that.