palmer@duck.ncsc.org (Thomas C. Palmer) (06/04/91)
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 - Thomas C. Palmer Internet: palmer@ncsc.org Cray Research, Inc. Phone: (919) 248-1117 North Carolina Supercomputing Center PO BOX 12889 RTP, NC 27709
srp@babar.mmwb.ucsf.edu (Scott R. Presnell) (06/04/91)
palmer@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@cgl.ucsf.edu University of California UUCP: ...ucbvax!ucsfcgl!srp San Francisco, CA. 94143-0446 Bitnet: srp@ucsfcgl.bitnet