Re: Inconsistancies in /proc (status vs statm) leadingto wrong documentation (proc.txt)

From: Albert Cahalan
Date: Sat Oct 09 2004 - 12:08:48 EST


On Sat, 2004-10-09 at 12:46, Eric Valette wrote:
> Albert Cahalan wrote:
>
> >>Well the Documentation is said to matches 2.6.8-rc3 and is only 5 weeks
> >>old according to bitkeeper changesets... So at least the doc should be
> >>fixed.
> >
> >
> > Removal would be simpler.
>
> I beg to disagree. statm catche eyes when you want to know precisely
> your memory usage or do you consider to be the single statm user via procps?

Not quite, but close. Those that know are willing
to read the kernel code, including that of past
releases, can certainly use the statm file.

> > I could go for another number: available address space.
> > Then I could display percent used.
>
> The free command does provide the information I think so it must be
> somewhere else...

Not at all. The free command is not per-process,
and doesn't ever deal with address space. It deals
with RAM.

For example, on a typical i386 box, you have almost
3 GB of address space available. (minus a bit at the
top for syscall handling, and perhaps minus a page at
address 0) The portion of this in use is of interest.

> > Even the other files are only partly for humans.
> > Minor changes will cause many tools to break.
>
> Sure but many people in the embedded wolrd need to know precisley
> process memory usage and possibly inside the program itsel not via
> top/ps/free/...

For that, go directly to /proc/*/maps and be happy.
You may also want the RSS from /proc/*/status.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/