Access to user process info.
Dusan Nedeljkovic
dusan at osupyr.UUCP
Thu Dec 18 10:54:52 AEST 1986
Briefly: I need to get access to information about a certain (or
more generally, ALL) processes that are active and bound
to a terminal.
(I also have read access to all pertinent files.)
Machine: Pyramid 90x running BSD Unix 4.2
I've sent news out about this, and have gotten conflicting
suggestions...some people say to access <sys/user.h> in
/dev/kmem and /vmunix -- but I've had no success with this;
still others say that I am on the wrong track, because this
information varies across machines so that it can't be done
using the structures in <sys/user.h>.
I guess, what I'm really asking is how the unix utility "w"
gets its information from the system about active processes.
To refresh your memory, I've included some sample "w" output:
User tty login@ idle JCPU PCPU what
dusan ttyi02 7:24pm 1:06 28 w
alden ttyi03 5:29pm 2 7:03 22 emacs /etc/termcap
gae ttyi17 7:45pm 8 8 rn
How does "w" get all this useful info? I can't imagine that
it doesn't use <sys/user.h>, etc.
Any info would be GREATLY appreciated. Thanks in advance.
Dusan. (Ohio State Univ. -- Math/Sciences Computer Lab)
( Columbus, OH 43210 )
* dusan%osupyr.uucp at osu-eddie.uucp *
* cbatt!osupyr!dusan *
--
Dusan. (Ohio State Univ. -- Math/Sciences Computer Lab)
( Columbus, OH 43210 )
* dusan%osupyr.uucp at osu-eddie.uucp *
* cbatt!osupyr!dusan *
More information about the Comp.unix.questions
mailing list