finding the u structure in /dev/mem on SYSV (how ?)
Frank Glass
fsg at holos0.UUCP
Fri Aug 5 04:06:40 AEST 1988
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.
(I have no problem finding u structures of swapped processes in /dev/swap).
I can't seem to find a _consistent_ macro to relate the pointer or click
number in the proc structure to the offset into /dev/mem. I am using
AT&T 3b2, NCR Tower 32 and a Xenix 286 machine. I have solved the problem
on two of the three, but there seems not to be a common solution and I have
many machines to go.
Any email help here will be much appreciated.
My CORRECT uucp routing: ...!gatech!holos0!fsg
--
Frank Glass
Holos Software, Inc.
Voice: (404) 496-1358
UUCP: ...!gatech!holos0!fsg
More information about the Comp.unix.wizards
mailing list