Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!mit-eddie!rutgers!cmcl2!adm!xadmx!rbj@nav.icst.nbs.gov
From: rbj@nav.icst.nbs.gov (Root Boy Jim)
Newsgroups: comp.unix.wizards
Subject: finding the u structure in /dev/mem on SYSV (how ?)
Message-ID: <16837@adm.ARPA>
Date: 17 Aug 88 12:48:43 GMT
Sender: news@adm.ARPA
Lines: 23

? From: fsg@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	
	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!