More Iris questions

Jim Barton jmb at patton.SGI.COM
Sat Feb 25 02:56:54 AEST 1989


In article <4337 at pt.cs.cmu.edu>, gleicher at b.gp.cs.cmu.edu (Michael Gleicher) writes:

...
   (questions I can't answer skipped ...)
...

> 4) The "gr_osview" program displays statistics like %cpu idle, %memory free,
> 	%time waiting. Is there a way I can get at these numbers from a
> 	C program so I can display them in a more convenient fashion?
> 

"gr_osview" uses the standard System V structure sysinfo, which is 
"documented" in the header file /usr/include/sys/sysinfo.h.  The structure can
be conviently read using the sysmp(2) call, which has a man page, and uses
the /usr/include/sys/sysmp.h header file.  This avoids having to read the
UNIX namelist and read from /dev/kmem, like standard SysV does.  There are
other interesting hooks in sysmp(2), some of which gr_osview uses.

...

> -- 
> Michael Lee Gleicher				gleicher at cs.cmu.edu
> Computer Graphics & Animation, School of Computer Science
> Carnegie Mellon University, Pittsburgh, PA 15213-3890
> -- 

-- Jim Barton
Silicon Graphics Computer Systems    "UNIX: Live Free Or Die!"
jmb at sgi.sgi.com, sgi!jmb at decwrl.dec.com, ...{decwrl,sun}!sgi!jmb

  "I used to be disgusted, now I'm just amused."
			- Elvis Costello, 'Red Shoes'
--



More information about the Comp.sys.sgi mailing list