Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!ucla-cs!sdcrdcf!ism780c!mikep From: mikep@ism780c.UUCP (Michael A. Petonic) Newsgroups: comp.unix.wizards Subject: Re: Using argv to show process status Message-ID: <7166@ism780c.UUCP> Date: Sun, 23-Aug-87 20:02:12 EDT Article-I.D.: ism780c.7166 Posted: Sun Aug 23 20:02:12 1987 Date-Received: Tue, 25-Aug-87 01:44:34 EDT References: <1217@mhres.mh.nl> <6303@brl-smoke.ARPA> <1224@mhres.mh.nl> <7164@ism780c.UUCP> <1229@mhres.mh.nl> Reply-To: mikep@ism780c.UUCP (Michael A. Petonic) Organization: Interactive Systems Corp., Santa Monica CA Lines: 22 In article <1229@mhres.mh.nl> jv@mhres.mh.nl (Johan Vromans) writes: >By clobbing argv, it is possible to reveal in a ps display which pseudo >program the interpreter is currently executing. This can be important in >situations where the system manager has to decide whether a user task can >be killed safely. > >Currently there is no way for the system administrator to find out who is >doing what. Clobbing argv supplies a method which works on at least >some systems (the BSD type systems). For other systems, other methods >must be used. Ok, enough "illegial" things that are crossing the net. How about the simple approach of modifying the interpreter to write pertinent info to a file (say in /usr/adm) which shows what program is running? This could be done in much the same way that utmp is implemented. That way, you don't stand a chance of clobbering core that doesn't belong to you and it is probably the way it "should" be done. Then, you could have a program that reads the file (or if you stuck really close to the utmp format, you could use the "who" program) and output's what they are doing. Does this make more sense?