colburn@io.SRC.Honeywell.COM (Mark H. Colburn) (03/11/89)
In article <1119@auspex.UUCP> guy@auspex.UUCP (Guy Harris) writes:
+>In DG/UX, as of 4.00, there is a system call "dg_process_info", which
+>returns just about everything you'd want from a 'ps'. You can specify
+>a uid, pid, tty, pgrp or 'all' (the -u, -p, -t, -g and -e options) to
+>to limit the processes returned. You just sit in a loop for as long as
+>the call returns 1.
+
+S5R4 will probably do something similar with "/proc". Basically, the
+loop will probably look something like:
The SunOS 4.0 release has a fast version of PS. The first time I ran it I
was waiting for it to start as all the information scrolled off the
screen... Whether this will be in later versions of S5r4 or not, I don't
know, but, as usuall, Guy's prediction is probably accurate.
I believe that Sun does the fast ps by cacheing all of the process status
information in the kernel, rather than having to read /etc/utmp, etc.
Mark H. Colburn MN65-2300 colburn@SRC.Honeywell.COM
Systems Administration and Support
Honeywell Systems & Research Center
guy@auspex.UUCP (Guy Harris) (03/14/89)
>I believe that Sun does the fast ps by cacheing all of the process status >information in the kernel, rather than having to read /etc/utmp, etc. You believe something that is not true. Sun does the fast "ps" by caching a fair bit of information in "/etc/psdatabase" - amazingly enough, this is just what the 4.3BSD "ps" does, even down to the name of the file. Wow, what a coincidence! :-) (No, the "kvm" library doesn't do any magic; it's just a library that encapsulates what used to be independently implemented in several "kmem"-reader programs - i.e., it opens "/dev/kmem" and grovels through it in much the same way "ps" used to do.) More recent System V "ps"s do much the same thing, only they call the file "/etc/ps_data". The S5R4 "ps" will probably 1) use "/proc", since it'll be in S5R4; 2) use "/etc/ps_data" if necessary.
rock@cbnews.ATT.COM (Y. Rock Lee) (03/17/89)
In article <1069@vsi.COM> friedl@vsi.COM (Stephen J. Friedl) writes: >Anybody wanting more info on /proc for the 3B15 can send mail to me: >I've got a couple of programs that are kind of fun. I haven't done any work related to /proc yet, but would like to learn more about it. Thanks in advance. Rock ------------------------------------- Y. Rock Lee (614) 860-4774 UUCP: att!cblpe!rock ARPANET/INTERNET: rock@cbnews.ATT.COM