[comp.sys.mips] Interpretation of CPU time usage

bin@primate.wisc.edu (Brain in Neutral) (07/25/89)

The sysinfo structure in /usr/include/sys/sysinfo.h contains the following:


struct sysinfo {
	time_t	cpu[5];
#define	CPU_IDLE	0
#define	CPU_USER	1
#define	CPU_KERNEL	2
#define	CPU_WAIT	3
#define CPU_SXBRK	4
	time_t	wait[3];
#define	W_IO	0
#define	W_SWAP	1
#define	W_PIO	2
	etc.

How does one interpret this?  What, for instance, is the meaning of CPU_SXBRK.
I note, too, that vsar reports under cpu utilization the time waiting for
I/O, but that seems to be stored in the wait[] array rather than the cpu[]
array.  Are these two arrays to be considered together when determining CPU
time spent in various states?  E.g., if I want to determine the amount of time
the CPU is idle, how do I do it?  Presumably CPU_WAIT counts in this...what
else?

Paul DuBois
dubois@primate.wisc.edu