pcp
[Top] [All Lists]

Re: Meminfo confusion

To: Uncle Than <unclethan@xxxxxxxxx>
Subject: Re: Meminfo confusion
From: Mark Goodwin <markgw@xxxxxxx>
Date: Fri, 15 Feb 2002 10:26:09 +1100 (EST)
Cc: <pcp@xxxxxxxxxxx>
In-reply-to: <20020214225742.68050.qmail@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: owner-pcp@xxxxxxxxxxx
On Thu, 14 Feb 2002, Uncle Than wrote:

> I had been under the assumption that 
> 
> mem.physmem = mem.util.free + mem.util.shared + mem.util.cached +
> mem.util.bufmem.

Also notice physmem as reported in /proc/meminfo does not 
correspond to real physical mem; it's almost the same, but does
not account for a small amount of mem reserved by the kernel.
A way to figure out the exact amount still eludes me .. anyone know?

> 
> On a RH7.2 box (kernel 2.4.7-10) this is not the case.
> This is due to mem.util.cached being comprised of cache in ram and
> cache in swap. As denoted by the new entry (was not in RH7.1 [kernel
> 2.4.2-2]) in /proc/meminfo, "SwapCached".
> 
> This would be a pretty useful metric to grab, as would most of the
> other one-liners in /proc/meminfo. So should I:
> 
> 1) come up with a patch for the the linux pmda?
> 2) let the maintainers do it?
> 3) or roll up a new one?
> 
> Given the state of my C-code lately .. I would vote for #2 *8)

well I would vote for #1 of course! Note that you'll need to be backward
compatible for kernels < 2.4.7-10).

thanks
-- Mark


<Prev in Thread] Current Thread [Next in Thread>