finding the u structure in /dev/mem on SYSV (how ?)

Root Boy Jim rbj at nav.icst.nbs.gov
Wed Aug 17 22:48:43 AEST 1988


? From: fsg at holos0.UUCP (Frank Glass)

? I am writing a routine to list UNIX processes and their respective ages.
? I need for the source to be reasonably portable across System V (or at
? least USG) breeds of machines.  Getting to the proc table seems simple
? and consistent:  use nl() to get proc address from /unix, seek to that address
? in /dev/kmem and read the first element in.  Any macros I need seem to be in
? sys/sysmacros.h.  The next problem is getting to the u structure in /dev/mem.

Just a side issue, but what if things change during your poking around in
/dev/{kmem,swap}? How do ps-like programs deal with such things? 

? Frank Glass
? Holos Software, Inc.
? Voice: (404) 496-1358
? UUCP: ...!gatech!holos0!fsg

	(Root Boy) Jim Cottrell	<rbj at icst-cmr.arpa>
	National Bureau of Standards
	Flamer's Hotline: (301) 975-5688
	The opinions expressed are solely my own
	and do not reflect NBS policy or agreement
	Careful with that VAX Eugene!



More information about the Comp.unix.wizards mailing list