Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!seismo!rutgers!clyde!cbatt!osupyr!dusan
From: dusan@osupyr.UUCP (Dusan Nedeljkovic)
Newsgroups: comp.unix.wizards,comp.unix.questions
Subject: Access to user process info.
Message-ID: <99@osupyr.UUCP>
Date: Wed, 17-Dec-86 19:54:52 EST
Article-I.D.: osupyr.99
Posted: Wed Dec 17 19:54:52 1986
Date-Received: Thu, 18-Dec-86 07:30:06 EST
References: <1327@brl-adm.ARPA> <165@hqda-ai.UUCP> <263@spectrix.UUCP>
Reply-To: dusan@osupyr.UUCP (Dusan Nedeljkovic)
Organization: Ohio State Univ. Math Dept.
Lines: 42
Xref: mnetor comp.unix.wizards:390 comp.unix.questions:393

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  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 .

	  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 , etc.  

	  Any info would be GREATLY appreciated.  Thanks in advance.


Dusan.	(Ohio State Univ. -- Math/Sciences Computer Lab)
	(             Columbus, OH  43210	       )
	*	dusan%osupyr.uucp@osu-eddie.uucp       *
	*	       cbatt!osupyr!dusan	       *
-- 

Dusan.	(Ohio State Univ. -- Math/Sciences Computer Lab)
	(             Columbus, OH  43210	       )
	*	dusan%osupyr.uucp@osu-eddie.uucp       *
	*	       cbatt!osupyr!dusan	       *