Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] Limiting amount of memory



On Thu, Sep 12, 2013 at 7:58 PM, Richard Pieri <richard.pieri at gmail.com> wrote:
> Tim Callaghan wrote:
>>
>> What am I missing?
>
>
> free tells you what's available, not what's actually detected, for a variety
> of reasons. What you really want is the first line of /proc/meminfo.
>
>   head -1 /proc/meminfo
>
> That will tell you precisely how much real, physical memory the kernel
> detects.

On my system, they both provide identical info (If you look at the right field):

====

$ free
                          total          used              free
shared      buffers      cached
Mem:      16427512    3820212   12607300           0     295988    1024352
                ^^^^^^^^^^
-/+ buffers/cache:    2499872   13927640
Swap:      4479996       3928    4476068


$ head -1 /proc/meminfo
MemTotal:       16427512 kB
                          ^^^^^^^^^^^^^

====

If your system has been booted recently enough, you can use dmesg to
retrieve recent kernel messages.   For example:

$ dmesg | grep Memory
[    0.000000] Memory: 16405004k/17563648k available (5837k kernel
code, 370284k reserved, 2862k data, 744k init, 15862344k highmem)
[    2.501001]     Memory Size: 3844600 kB

The first line provides plenty of info about what the kernel thinks
about memory on my system.

Bill Bogstad



BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org