Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!ucbvax!mtxinu!shore From: shore@mtxinu.COM (Melinda Shore) Newsgroups: comp.unix.questions Subject: Re: "Monitoring" a process Message-ID: <1991Jan23.213723.22224@mtxinu.COM> Date: 23 Jan 91 21:37:23 GMT References: <279B5779.58AF@telly.on.ca> <382@bria> Reply-To: shore@mtxinu.com (Melinda Shore) Organization: mt Xinu, Berkeley Lines: 21 In article <382@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@mtxinu.com mt Xinu ..!uunet!mtxinu.com!shore