[Top] [All Lists]

Re: Meminfo confusion

To: Keith Owens <kaos@xxxxxxx>
Subject: Re: Meminfo confusion
From: Mark Goodwin <markgw@xxxxxxx>
Date: Mon, 18 Feb 2002 13:00:30 +1100 (EST)
Cc: <pcp@xxxxxxxxxxx>
In-reply-to: <11328.1013996683@xxxxxxxxxxxxxxxxxxxxxx>
Sender: owner-pcp@xxxxxxxxxxx
On Mon, 18 Feb 2002, Keith Owens wrote:

> On Fri, 15 Feb 2002 10:26:09 +1100 (EST), 
> Mark Goodwin <markgw@xxxxxxx> wrote:
> >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?
> ls -l /proc/kcore | awk '{printf("mem=%dM\n", ($5-4096)/1024/1024)}'
> Works for me on i386 and ia64.  Have not tried it on discontiguous
> systems.  It reports what memory the kernel can see, not what the
> machine has, which is exactly what we want for performance purposes.

but not what we want for reporting machine h/w inventory,
as needed for the hinv.physmem PCP metric. 

Running this on sherman (2G RAM), this is way off:
sherman 1% ls -l /proc/kcore | awk '{printf("mem=%dM\n", ($5-4096)/1024/1024)}'

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