home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / linux / 20300 < prev    next >
Encoding:
Text File  |  1992-12-14  |  1.9 KB  |  40 lines

  1. Newsgroups: comp.os.linux
  2. Path: sparky!uunet!gatech!concert!samba!sunSITE!jem
  3. From: jem@sunSITE.unc.edu (Jonathan Magid)
  4. Subject: Re: ps that uses /proc
  5. Message-ID: <1992Dec14.083929.8481@samba.oit.unc.edu>
  6. Sender: usenet@samba.oit.unc.edu
  7. Nntp-Posting-Host: sunsite.unc.edu
  8. Organization: University of North Carolina, Chapel Hill
  9. References: <1992Dec14.032831.9921@u.washington.edu>
  10. Date: Mon, 14 Dec 1992 08:39:29 GMT
  11. Lines: 27
  12.  
  13. In article <1992Dec14.032831.9921@u.washington.edu> barr@stein.u.washington.edu (David Barr) writes:
  14. >Has anyone written a version of ps that uses the proc file system?  I
  15. >couldn't get my old version of ps to work with linux 0.99, so I wrote
  16. >my own ps program.  It uses the proc file system, so it should work
  17. >with any version of the kernel which includes this file system.  There
  18. >are a few major disadvantages of my program.  Because I wrote it in a
  19. >hurry, the output is kind of non-standard and there are only 3 options
  20. >(a, u and x).  I may fix it later if there is any interest.  There
  21. >were a few fields that I couldn't figure out how to get out of the
  22. >proc system.  These fields include MEM%, CPU%, MEM% and TIME.  I also
  23. >don't do nearly as much error checking as I should.  All that aside,
  24. >it does just about everything I need it to.  So here is the code
  25. >(comments are welcome):
  26.  
  27.  
  28. Good idea... someone else (poe@daimi.aau.dk (Peter Orbaek)) did do this though 
  29. in perl (good thing too. it allowed me to save my system without having to 
  30. reboot and corrupt my file system, but thats story for another day.  thanks
  31. Peter!).  His version is Posix compliant and works quite well. :)
  32.  
  33. But being in perl, it's probably a bit slower than yours.
  34.  
  35. jem.
  36. -- 
  37. Jonathan Magid     jem@sunSITE.unc.edu       sunSITE Administrator
  38. Virtual pizza Delivery (tm)::faxed in 30 cycles or less or you get it
  39. ----------------------------------------FREE!!!-----------------------
  40.