Subject: Re: procfs on MicroVAX II
To: der Mouse <mouse@rodents.montreal.qc.ca>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: port-vax
Date: 09/28/1997 08:57:38
On Sun, 28 Sep 1997 09:05:04 -0400 (EDT)
der Mouse <mouse@Rodents.Montreal.QC.CA> wrote:
> This has nothing to do with procfs. ps uses libkvm, not procfs, to
> gather its information. (Why? Damned if I know. Probably because
> "procfs is optional". Why? It's buggy. Why? 'Cause nobody uses it
> enough to fix it. Why? 'Cause no software uses it. Why? You can't
> count on its presence, 'cause it's optional. Why? It's buggy. Why?
> Round and round....) This despite the fact that procfs allows a ps
> that never produces such messages (at least in principle, I don't know
> whether current procfs actually does).
We've been over this on other lists at least a dozen times... Here is the
canonical answer for why ps(1) doens't use procfs:
If you use procfs, you are either going to have to parse strings
(slow, unreliable if the string format changes) or rely on
structure formats (which is what we do now). Since we have to
keep the kvm support in ps anyhow (because that's needed for
looking at the process table on crash dumps), adding additional
code to use procfs for such a marginal gain doens't really make
much sense.
It has nothing to do with procfs being "buggy" (it has, in fact, historically
worked pretty well, modulo various security problems which are addressed
along the way).
Jason R. Thorpe thorpej@nas.nasa.gov
NASA Ames Research Center Home: +1 408 866 1912
NAS: M/S 258-6 Work: +1 415 604 0935
Moffett Field, CA 94035 Pager: +1 415 428 6939