Unix administration - Re: determine physical memory size?

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > January 2004 > Re: determine physical memory size?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: determine physical memory size?
Cameron Laird

2004-01-23, 4:41 pm

In article <bnf0pi057d@enews1.newsguy.com>,
John Reiser <jreiser@BitWagon.com> wrote:
quote:

>
>Use the same method that the kernel uses. In a vm86 "DOS box",
>issue the BIOS call "int $0x15" with 0xE820==%ax.
>See arch/i386/boot/setup.S, include/asm/e820.h,
>and arch/i386/kernel/setup.c in the kernel sources.
>



Also of potential interest:
vmstat -s | grep memory

There are a variety of other approaches in between these two extremes
of BIOS call and command-line report ...
--

Cameron Laird <claird@phaseit.net>
Business: http://www.Phaseit.net
Thomas Reat

2004-01-23, 4:41 pm

claird@lairds.com (Cameron Laird) wrote in message news:<vpmi6kfn0i4jbf@corp.supernews.com>...
quote:

>
> Also of potential interest:
> vmstat -s | grep memory
>
> There are a variety of other approaches in between these two extremes
> of BIOS call and command-line report ...



Unfortunately, all of those lines contain information pulled directly
from /proc/meminfo. None of them report the amount of physical memory
on the machine.

For example, on a system with 512MB:
$ vmstat -s|grep memory
515536 kB total memory
507096 kB used memory
225580 kB active memory
252360 kB inactive memory
8440 kB free memory
170656 kB buffer memory

The closest is "total memory", but it reports 503.5MB.
Cameron Laird

2004-01-23, 4:51 pm

In article <bnf0pi057d@enews1.newsguy.com>,
John Reiser <jreiser@BitWagon.com> wrote:
quote:

>
>Use the same method that the kernel uses. In a vm86 "DOS box",
>issue the BIOS call "int $0x15" with 0xE820==%ax.
>See arch/i386/boot/setup.S, include/asm/e820.h,
>and arch/i386/kernel/setup.c in the kernel sources.
>



Also of potential interest:
vmstat -s | grep memory

There are a variety of other approaches in between these two extremes
of BIOS call and command-line report ...
--

Cameron Laird <claird@phaseit.net>
Business: http://www.Phaseit.net
Thomas Reat

2004-01-23, 4:51 pm

claird@lairds.com (Cameron Laird) wrote in message news:<vpmi6kfn0i4jbf@corp.supernews.com>...
quote:

>
> Also of potential interest:
> vmstat -s | grep memory
>
> There are a variety of other approaches in between these two extremes
> of BIOS call and command-line report ...



Unfortunately, all of those lines contain information pulled directly
from /proc/meminfo. None of them report the amount of physical memory
on the machine.

For example, on a system with 512MB:
$ vmstat -s|grep memory
515536 kB total memory
507096 kB used memory
225580 kB active memory
252360 kB inactive memory
8440 kB free memory
170656 kB buffer memory

The closest is "total memory", but it reports 503.5MB.
Cameron Laird

2004-01-23, 5:06 pm

In article <bnf0pi057d@enews1.newsguy.com>,
John Reiser <jreiser@BitWagon.com> wrote:
quote:

>
>Use the same method that the kernel uses. In a vm86 "DOS box",
>issue the BIOS call "int $0x15" with 0xE820==%ax.
>See arch/i386/boot/setup.S, include/asm/e820.h,
>and arch/i386/kernel/setup.c in the kernel sources.
>



Also of potential interest:
vmstat -s | grep memory

There are a variety of other approaches in between these two extremes
of BIOS call and command-line report ...
--

Cameron Laird <claird@phaseit.net>
Business: http://www.Phaseit.net
Thomas Reat

2004-01-23, 5:06 pm

claird@lairds.com (Cameron Laird) wrote in message news:<vpmi6kfn0i4jbf@corp.supernews.com>...
quote:

>
> Also of potential interest:
> vmstat -s | grep memory
>
> There are a variety of other approaches in between these two extremes
> of BIOS call and command-line report ...



Unfortunately, all of those lines contain information pulled directly
from /proc/meminfo. None of them report the amount of physical memory
on the machine.

For example, on a system with 512MB:
$ vmstat -s|grep memory
515536 kB total memory
507096 kB used memory
225580 kB active memory
252360 kB inactive memory
8440 kB free memory
170656 kB buffer memory

The closest is "total memory", but it reports 503.5MB.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com