Symbol name for kernel CPU utilization variable?

Scott R. Presnell srp at babar.mmwb.ucsf.edu
Tue Jun 4 14:12:50 AEST 1991


palmer at duck.ncsc.org (Thomas C. Palmer) writes:

>Can anyone tell me the kernel symbol name to pass to nlist() to
>ascertain CPU utilization times (user, system, idle, etc)?  The rstat
>daemon does it so I know it's possible.  Thanks -

Try sysmp() instead, the defines in /usr/include/sys/sysinfo.h help explain
the data you get back...

#include <sys/sysmp.h>
#include <sys/sysinfo.h>

struct sysinfo si;

	...

	if (sysmp(MP_SAGET, MPSA_SINFO, &si, sizeof(si)) < 0) 
		error();
	else
		doit(&si);

	...


	- Scott
--
Scott Presnell				        +1 (415) 476-9890
Pharm. Chem., S-926				Internet: srp at cgl.ucsf.edu
University of California			UUCP: ...ucbvax!ucsfcgl!srp
San Francisco, CA. 94143-0446			Bitnet: srp at ucsfcgl.bitnet



More information about the Comp.sys.sgi mailing list