home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / aix / 9648 < prev    next >
Encoding:
Internet Message Format  |  1992-09-14  |  1.5 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!sample.eng.ohio-state.edu!purdue!mentor.cc.purdue.edu!mace.cc.purdue.edu!abe
  2. From: abe@mace.cc.purdue.edu (Vic Abell)
  3. Newsgroups: comp.unix.aix
  4. Subject: Re: per-process table on RS6000
  5. Message-ID: <BuL2Ez.1u0@mentor.cc.purdue.edu>
  6. Date: 14 Sep 92 19:35:22 GMT
  7. References: <203@kedeng.UUCP>
  8. Sender: news@mentor.cc.purdue.edu (USENET News)
  9. Organization: Purdue University
  10. Lines: 31
  11.  
  12. In article <203@kedeng.UUCP> kenc@kedeng.UUCP (Ken Cornetet) writes:
  13. >How does one read the per-process (user) table under aix on a RS-6000 ?
  14.  
  15. Use the getuser() function.
  16.  
  17.     getuser(struct procinfo *p, int pn, void *u, int un)
  18.  
  19.     *p is a structure previously filled by getproc() and pn is its length.
  20.  
  21.     *u may be a userinfo or user structure -- its length, un, defines
  22.     which it is.
  23.  
  24. The getproc function is defined as:
  25.  
  26.     getproc(struct procinfo *p, int np, int pn)
  27.  
  28.     *p may point to an array of procinfo structures.
  29.  
  30.     np is the number being requested.
  31.  
  32.     pn is the size of the one element of *p.
  33.  
  34. On can call getproc() with one element in *p and a request count of 0 to
  35. acquire information about how many elements to allocate.  There is an
  36. example of getproc() and getuser() usage in lsof. Obtain it via anonymous
  37. ftp from j.cc.purdue.edu (128.210.9.2) in pucc/lsof.tar.Z (version 1) or
  38. pucc/lsof2B/tar.Z (version 2 Beta).
  39.  
  40. One can also read the user area with readx().  Version 2 of lsof has
  41. examples of reading the extended user area that way to get the loader
  42. information.
  43.