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