Retrieving per-process info on DS3100

Alan's Home for Wayward Notes File. alan at shodha.dec.com
Sat Jul 14 01:33:11 AEST 1990


In article <2371.269db532 at csc.anu.oz>, pjy100 at csc.anu.oz writes:
> Can anyone help ????
> 
> I wish to obtain information about every process currently on the system
> from the two data structures "proc" and "user" (see /usr/include/sys/proc.h
> & /usr/include/sys/user.h) from within a "c" program, but I cannot find a 
> system call that will retrieve this information from the system tables.
> How can this be done? (pstat & ps must use the method I require). SunOS 
> provides the calls "kvm_nextproc" & "kvm_getu" for doing what I need, is there
> an equivalent method for Ultrix 3.1 on a DS3100.

	Pstat, ps, top, monitor, etc all do it basically the
	way; open /dev/kmem, seek to an interesting place and
	read the data.  Getting the proc structure is pretty
	easy.  Getting a copy of the user structure is harder
	because you have to deal with the fact that it might
	swapped out.  I'd suggest looking for a copy of top
	or monitor that you can copy and borrow from them.

	I think monitor can be found on gatekeeper.dec.com.

	If you think having a system call interface to some of
	these data structures would make your life so much easier
	please submit an SPR with the suggestion.  If there is
	sufficient popular interest it might get added someday.

> Peter Young (systems prog. Mt Stromlo Observatory)


-- 
Alan Rollow				alan at nabeth.enet.dec.com



More information about the Comp.unix.ultrix mailing list