home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / unix / internal / 1970 < prev    next >
Encoding:
Text File  |  1992-11-19  |  1.5 KB  |  38 lines

  1. Newsgroups: comp.unix.internals
  2. Path: sparky!uunet!unislc!erc
  3. From: erc@unislc.uucp (Ed Carp)
  4. Subject: Re: PS info from C?
  5. X-Newsreader: TIN [version 1.1 PL6]
  6. References: <1992Nov13.114227.2506@unix.brighton.ac.uk>
  7. Message-ID: <1992Nov20.001347.8254@unislc.uucp>
  8. Organization: Unisys Corporation SLC
  9. Date: Fri, 20 Nov 1992 00:13:47 GMT
  10. Lines: 26
  11.  
  12. Durrant;f110or89;[05306 (jmd6@unix.brighton.ac.uk) wrote:
  13.  
  14. : I using sunos 4.1.2.3 and I'm after getting access to
  15. : the process information for a running process. By info
  16. : I mean processor time used, command running, mem in use, etc.
  17. : The sort of thing that ps returns. I think it should be 
  18. : possible through ptrace but this only terminates the process
  19. : I attach to.
  20.  
  21. There is a set of calls (kvm_*) that SunOS uses to do this; they're quite easy
  22. to use.  You have to use "-lkvm" to link with, though.  If you want me to,
  23. I'll be happy to email you some sample source...
  24.  
  25. Do a "man kvm_open" on SunOS - I think it'll tell you all you need to know.
  26. --
  27. Ed Carp            erc@apple.com, erc@saturn.upl.com    801/538-0177
  28.  
  29. "There is nothing to seek and nothing to find.  You're already enlightened, and
  30. all the words in the world won't give you what you already have.  The wise
  31. seeker, therefore, is concerned with one thing only: to become aware of what
  32. he already is, of the True Self within."  -- Zen maxim
  33. -- 
  34. Ed Carp            erc@apple.com, erc@saturn.upl.com    801/538-0177
  35.  
  36. "There is nothing to seek and nothing to find.  You're already enlightened, and
  37. all the words in the world won't give you what you already have.  The wise
  38.