pcp
[Top] [All Lists]

Re: Meminfo confusion

To: m.knoblauch@xxxxxxxxxxx
Subject: Re: Meminfo confusion
From: Martin Knoblauch <Martin.Knoblauch@xxxxxxxxxxx>
Date: Mon, 18 Feb 2002 08:50:35 +0100
Cc: Keith Owens <kaos@xxxxxxx>, pcp@xxxxxxxxxxx
Organization: TeraPort GmbH
References: <11577.1014001943@kao2.melbourne.sgi.com> <3C70AFCD.11523550@TeraPort.de>
Reply-to: m.knoblauch@xxxxxxxxxxx
Sender: owner-pcp@xxxxxxxxxxx
Martin Knoblauch wrote:
> 
> Keith Owens wrote:
> >
> > On Mon, 18 Feb 2002 13:00:30 +1100 (EST),
> > Mark Goodwin <markgw@xxxxxxx> wrote:
> > >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)}'
> > >mem=896M
> >
> > Because sherman is running a kernel that was not compiled for highmem.
> > That restricts the kernel to 896M of physical memory, the value is
> > correct.  I will recompile sherman for highmem.
> 
>  Hmm. I have seen this 896MB reporting on kernels with 1GB and more and
> HIHMEM support compiled in (as shown by "free").
> 
 
 Oops, message did not go to the list. Monday morning caffeine
deprivation. I also, as already remarked, the kproc solution is not
giving the answer to "total physical memory". The numbers are basically
in the same ballpark at the MemTotal from meminfo.

 So far the best I have seen is "max_mapnr" (guaranteed to be in the
kernel), or the sum of all mtrr entries with write-back property (not
guaranteed to be available, older 2.4 kernels report complete nonsense).

Martin
-- 
------------------------------------------------------------------
Martin Knoblauch         |    email:  Martin.Knoblauch@xxxxxxxxxxx
TeraPort GmbH            |    Phone:  +49-89-510857-309
C+ITS                    |    Fax:    +49-89-510857-111
http://www.teraport.de   |    Mobile: +49-170-4904759

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