Need information on getprocinfo()

John F Haugh II jfh at rpp386.cactus.org
Sat Mar 30 00:08:12 AEST 1991


In article <1991Mar29.063253.2770 at rice.edu> berk at 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 at rpp386.cactus.org
"I want to be Robin to Bush's Batman."
                -- Vice President Dan Quayle



More information about the Comp.unix.aix mailing list