Question abt /etc/crash & proc struct

moody at snap.austin.ibm.com moody at snap.austin.ibm.com
Thu Jun 20 23:51:59 AEST 1991


In article <1991Jun19.151832.17038 at socrates.umd.edu> berry at socrates.umd.edu (Joseph Berry     ) writes:
>I cannot access the data structure 'proc' either programmatically or

No one would want user mode programs to have access to this structure.

>from within /etc/crash.  

This can be done if you're looking at a dump.  Use the 'dump' subcommand in crash.  
Various components are listed.  Enter '1' for 'proc'.

The result is a list of ids which may be selected.  They looks something like:

1 0p
2 0u
3 1p
4 1u
....
...

or something like that.  The number of entries depends on the number of processes
running on your machine at the time the dump was taken.

The right column corresponds to a process slot (use the 'proc' subcommand
to see which process slot you may be interested in).  The 'u' and 'p'
suffixes are for 'user area' and 'proc table entry' respectively.
In the above example, by entering 3, I get the proc table entry for
the process in slot 1.  

For a LIVE system, you might look at the getproc, getuser system calls.
See procinfo.h.

>There's something I'm
>missing about accessing addresses in such a high address space. 

You don't have addressibility to the process table memory segment in user mode.


-- 
James Moody				aixnet:moody at moody.austin.ibm.com
Personal Systems Programming Austin	VNET:MOODY at AUSVMQ
AIX Field Support - Level 3		internet:moody at aixwiz.austin.ibm.com



More information about the Comp.unix.aix mailing list