Re: per-process shared information

Albert Cahalan
2004-10-15T19:38:03Z

On Fri, 2004-10-15 at 13:10, William Lee Irwin III wrote:
> On Fri, Oct 15, 2004 at 12:31:52PM -0400, Albert Cahalan wrote:
> > Currently, ps uses /proc/*/stat for that. The /proc/*/statm
> > file is read to determine TRS and DRS, which are broken now.
> > That it, unless you count "ps -o OL_m" format.
> > The top program uses /proc/*/statm for many more fields:
>
> And here I refute every last field with a description of what 2.4.x
> actually implemented and how its implementation renders the field
> gibberish.
...
> Thus we are left with exactly zero fields which are not gibberish in 2.4,
> and 2.4.x semantics have no leg left to stand upon.

Many are reasonable.

Jim developed "top" partly with a 2.2.xx kernel. He had
avoided the statm values at first, for performance, but
went back to using them when he found that the numbers
made more sense than the status and stat numbers did.

It is only recently that Debian stopped defaulting to
the 2.2.xx kernel. This isn't ancient history anywhere
beyond the linux-kernel mailing list.

Changing the columns offered may screw people up.
Believe it or not, people actually use top in scripts.
(everybody together now: "Eeeeeeew!")

Let /proc/*/statm be as slow as it needs to be.
It'll work right on normal systems then, and the
Altix users can simply configure top to display
columns that don't involve the statm files.