"Monitoring" a process

Melinda Shore shore at mtxinu.COM
Thu Jan 24 08:37:23 AEST 1991


In article <382 at bria> bria!mike (Michael Stefanik) writes:
>IMHO, there should be a function called procstat() that returns a pointer to
>an array of 'proc' structs.  Of course, it'll never happen.

That's not very general.  There are many kernel data structures that
are interesting/useful/whatever, and you shouldn't need a different
system call for each one.  Instead, you can use something like the
table system call (which Mach HAS) or the tabinfo/tabread system calls
(which Unicos HAS).  Also, from within the kernel you don't have to
read the namelist, because, of course, addresses are known at link
time.  And names of kernel data structures don't vary that much within
major Unix strains (or even among them - is there a Unix out there where
the name of the proc table isn't "proc"?).  You'll find sysinfo in just
about any sysV variant there is, for example.

[BTW, I would have sent you email about this but your "Reply-to:"
line totally loses and you have no From: line in your header.]
-- 
               Software longa, hardware brevis
Melinda Shore                                 shore at mtxinu.com
mt Xinu                              ..!uunet!mtxinu.com!shore



More information about the Comp.unix.questions mailing list