'ps' is too slow
Guy Harris
guy at auspex.UUCP
Tue Mar 14 05:04:15 AEST 1989
>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.
More information about the Comp.bugs.sys5
mailing list