home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / admin / 6746 < prev    next >
Encoding:
Internet Message Format  |  1992-12-22  |  2.2 KB

  1. Path: sparky!uunet!pipex!bnr.co.uk!uknet!doc.ic.ac.uk!cc.ic.ac.uk!imperial.ac.uk!vulture
  2. From: vulture@imperial.ac.uk (Thomas Sippel - Dau)
  3. Newsgroups: comp.unix.admin
  4. Subject: Re: showing working dirs of each users
  5. Message-ID: <1992Dec22.152249.14405@cc.ic.ac.uk>
  6. Date: 22 Dec 92 15:22:49 GMT
  7. References: <1992Dec21.082746.23803@latcs1.lat.oz.au> <78677@hydra.gatech.EDU>
  8. Sender: vulture@carrion.cc.ic.ac.uk (Thomas Sippel - Dau)
  9. Reply-To: cmaae47@imperial.ac.uk
  10. Organization: Imperial College of Science, Technology and Medicine
  11. Lines: 34
  12. Nntp-Posting-Host: cscgc
  13.  
  14. In article <78677@hydra.gatech.EDU>, gs26@prism.gatech.EDU (Glenn R. Stone) writes:
  15. - In <1992Dec21.082746.23803@latcs1.lat.oz.au> wongm@latcs1.lat.oz.au (M.C. Wong) writes:
  16. - >  I wonder if there is any utility that shows which working dir each
  17. - >  of the users are in, much like the finger and w command but also shows
  18. - >  where they are. Thank you !!
  19. ....
  20. - ps agxeww | egrep -e [ -][t-][ck]sh | awk {some really funky stuff here}
  21. - Where the above assumes nobody's running /bin/sh for a login shell, 
  22. - and {some really funky stuff} extracts the PWD= field from the output
  23. - of ps....
  24.  
  25. The real challenge is defining what the "user" is. If you want to find out
  26. because you want to check whether you can unmount a file system, you have to
  27. consider processes (shells at the very least), which do nothing but wait
  28. for their children.
  29.  
  30. If your users have X-terminals (or workstations ...) you also have to decide
  31. which of the active processes for a user are relevant.
  32.  
  33. If you want to find out where your users are doing what they are actually
  34. doing, you have to work out what is actually being done. If I watch the system
  35. performance monitor for a few minutes between reading news items (which I
  36. sometimes do ...) you would have to detect my eye movements before you could
  37. work out my "working" directory.
  38.  
  39.                                     Thomas
  40.  
  41. -- 
  42. *** This is the operative statement, all previous statements are inoperative.
  43. *   email: cmaae47 @ ic.ac.uk (Thomas Sippel - Dau) (uk.ac.ic on Janet)
  44. *   voice: +44 71 589 5111 x4937 or 4934 (day), or +44 71 823 9497 (fax)
  45. *   snail: Imperial College of Science, Technology and Medicine
  46. *   The Center for Computing Services, Kensington SW7 2BX, Great Britain
  47.