How do you determine the amount of system memory?

Dave Johnson dave-gnhlug-list at davej.org
Wed Jul 16 17:00:34 EDT 2008


Stephen Ryan writes:
> 
> On Wed, 2008-07-16 at 15:20 -0400, Paul Lussier wrote:
> > Hi all,
> > 
> > Recent Linux kernels have had a minor bug in that the amount of memory
> > reported in /proc/meminfo is incorrect.  I'm trying to find a way to
> > determine whether the amount reported is correct or not.
> > 
> > I need some means of reliably knowing whether this value is accurate
> > or not.  Does anyone have any ideas?  "Physically looking" is
> > insufficient, given that I a) need to test 400+ systems, and b) I may
> > need to run this test on boxes to which I have no physical access.
> > 
> > Thanks.
> 
> 
> dmidecode.  Look for sections titled "Memory Module Information".


The e820 info from the BIOS can help too (provided your BIOS is
bug-free), get it from dmesg or /var/log/dmesg


You'll need account for memory both below 4GB and above 4GB PA.  top
of low memory is usually between 2GB and 3.75GB with the remaining
memory starting at 4GB PA

Below 4GB includes the low 640KB-1MB reserved, plus ACPI, SMM, and
other reserved at the top of low memory, but from the 'usable'
sections you can determine where the top of low mem boundry is (just
round up to the next few MB in the last usable section):

system 1
--------

BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009f400 (usable)
 BIOS-e820: 000000000009f400 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 000000007fe50000 (usable)
 BIOS-e820: 000000007fe50000 - 000000007fe58000 (ACPI data)
 BIOS-e820: 000000007fe58000 - 0000000080000000 (reserved)
 BIOS-e820: 00000000fec00000 - 00000000fed00000 (reserved)
 BIOS-e820: 00000000fee00000 - 00000000fee10000 (reserved)
 BIOS-e820: 00000000ffc00000 - 0000000100000000 (reserved)
 BIOS-e820: 0000000100000000 - 000000107ffff000 (usable)

below 4GB PA is from 0000000000000000 - 0000000080000000 ( 2GB)
above 4GB PA is from 0000000100000000 - 0000001080000000 (62GB)

this system has 64GB RAM, split between physical addressses 0GB-2GB
and 4GB-66GB


system 2
--------

 BIOS-provided physical RAM map:
  BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
  BIOS-e820: 000000000009f000 - 00000000000a0000 (reserved)
  BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
  BIOS-e820: 0000000000100000 - 00000000efee0000 (usable)
  BIOS-e820: 00000000efee0000 - 00000000efee3000 (ACPI NVS)
  BIOS-e820: 00000000efee3000 - 00000000efef0000 (ACPI data)
  BIOS-e820: 00000000efef0000 - 00000000eff00000 (reserved)
  BIOS-e820: 00000000f0000000 - 00000000f4000000 (reserved)
  BIOS-e820: 00000000fec00000 - 0000000100000000 (reserved)
  BIOS-e820: 0000000100000000 - 0000000110000000 (usable)

below 4GB PA is from 0000000000000000 - 00000000f0000000 (3840MB)
above 4GB PA is from 0000000100000000 - 0000000110000000 ( 256MB)

This system has 4GB RAM, split between physical adresses 0MB-3840MB
and 4096MB-4352MB.


system 3
--------

BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 000000007dee0000 (usable)
 BIOS-e820: 000000007dee0000 - 000000007dee3000 (ACPI NVS)
 BIOS-e820: 000000007dee3000 - 000000007def0000 (ACPI data)
 BIOS-e820: 000000007def0000 - 000000007df00000 (reserved)
 BIOS-e820: 00000000fec00000 - 0000000100000000 (reserved)

below 4GB PA is from 0000000000000000 - 0000000080000000 (2GB)
above 4GB PA is no memory

This system has 2GB RAM all of which are from 0MB-2GB PA





-- 
Dave


More information about the gnhlug-discuss mailing list