home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cis.ohio-state.edu!sample.eng.ohio-state.edu!purdue!mentor.cc.purdue.edu!mace.cc.purdue.edu!abe
- From: abe@mace.cc.purdue.edu (Vic Abell)
- Newsgroups: comp.unix.aix
- Subject: Re: per-process table on RS6000
- Message-ID: <BuL2Ez.1u0@mentor.cc.purdue.edu>
- Date: 14 Sep 92 19:35:22 GMT
- References: <203@kedeng.UUCP>
- Sender: news@mentor.cc.purdue.edu (USENET News)
- Organization: Purdue University
- Lines: 31
-
- In article <203@kedeng.UUCP> kenc@kedeng.UUCP (Ken Cornetet) writes:
- >How does one read the per-process (user) table under aix on a RS-6000 ?
-
- Use the getuser() function.
-
- getuser(struct procinfo *p, int pn, void *u, int un)
-
- *p is a structure previously filled by getproc() and pn is its length.
-
- *u may be a userinfo or user structure -- its length, un, defines
- which it is.
-
- The getproc function is defined as:
-
- getproc(struct procinfo *p, int np, int pn)
-
- *p may point to an array of procinfo structures.
-
- np is the number being requested.
-
- pn is the size of the one element of *p.
-
- On can call getproc() with one element in *p and a request count of 0 to
- acquire information about how many elements to allocate. There is an
- example of getproc() and getuser() usage in lsof. Obtain it via anonymous
- ftp from j.cc.purdue.edu (128.210.9.2) in pucc/lsof.tar.Z (version 1) or
- pucc/lsof2B/tar.Z (version 2 Beta).
-
- One can also read the user area with readx(). Version 2 of lsof has
- examples of reading the extended user area that way to get the loader
- information.
-