Getting process status

Jeffrey Comstock jrc at brainiac.mn.org
Fri Apr 12 16:09:16 AEST 1991


In article <7269 at bgsuvax.UUCP> pthonda at bgsuvax.UUCP (Killer B) writes:
>
>
>Hi, I am trying to read the status of all the processes information in the system. 
>I came to know that the file 'vmunix' contains a pointer to a location in file 
>'kmem'.This location has another pointer to the starting of process structures in 
>kmem, which would give me process information. Can anybody tell me how to get the 
>pointer in the file 'vmunix' . Should I use nlist, if so , in what way.
>
>Thanx in advance .
>
>Pratap

Using SunOS, do a 'man -k kvm'.  There are some nice routines for dealing with
the kernel:

kvm_getproc, kvm_nextproc, kvm_setproc (3K) - read system process structures
kvm_read, kvm_write (3K)  copy data to or from a kernel image or running system


Jeff



More information about the Comp.unix.programmer mailing list