Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!cs.utexas.edu!chinacat!sequoia!rpp386!jfh From: jfh@rpp386.cactus.org (John F Haugh II) Newsgroups: comp.unix.aix Subject: Need information on getprocinfo() Message-ID: <19134@rpp386.cactus.org> Date: 29 Mar 91 14:08:12 GMT References: <1991Mar29.063253.2770@rice.edu> Reply-To: jfh@rpp386.cactus.org (John F Haugh II) Organization: Lone Star Cafe and BBS Service Lines: 44 X-Clever-Slogan: Recycle or Die. In article <1991Mar29.063253.2770@rice.edu> berk@blenda.rice.edu (Murat Berk) writes: >I try to get information on a process which pid is known. >The only referance I can find is the procinfo structure in the >/usr/include/procinfo.h file. > >>/* >> * An array of these structures is returned by getprocs() >> */ >>struct procinfo >>{ >.... > >But I cannot find any information for getprocs in info. Both find and search >for getprocs fails. Another reference is in the /usr/include/sys/proc.h >file. They recommend to read a file, > >> * NOTE: See sys/proc/README for details. > >I could not find this file. It is not under include, not under /usr/lpp That's because it is in the source code tree. >The only thing I want to have is a pointer to the procinfo structure >so I can get the user and sys times for a process. If there exist another >way or routine, where should I look for info. Please E-mail me. You should call the IBM support number that you have. They have been asked this question a thousand times and have exactly the information you are requesting. The interface was initially not documented because it wasn't to be used by user applications. Obviously user's think it is useful, so they are using it ;-) Actually, if you have the process ID you have the slot number that the (struct proc) is in. You can take that number and use it as an offset into the process table and read the entire structure yourself. Of course that's very unportable ... This is another question for the FAQ for this group. Is there anybody collecting them this week??? -- John F. Haugh II | Distribution to | UUCP: ...!cs.utexas.edu!rpp386!jfh Ma Bell: (512) 832-8832 | GEnie PROHIBITED :-) | Domain: jfh@rpp386.cactus.org "I want to be Robin to Bush's Batman." -- Vice President Dan Quayle