Re: Free memory, include "cached"?

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

>>> I have to report the amount of FreeMem on my embedded system. The rootfs
>>> is in RAM. I use /proc/meminfo.
>>> I started by doing : freemem = MemFree + Buffers + Cached
>>> But I realized (tell me if I'm wrong) that my rootfs filesystems is
>>> counted in "Cached".
>>> Part of the memory in "Cached" can be allocated, so I should add it as
>>> Free Memory, but part of it is my rootfs (i.e. really used).
>>> How should I compute freemem ?
>> Have you tried the free command.
> Yes. What I need is to know which part of "Cached" is used for RAMFS.

Within "Cached" the size of the rootfs is used for  RAMFS.So if you
add or delete file
the Cached size will increase or decrease accordingly.This is because
of the way ramfs
is implemented.If you use tmpfs even that might(tmpfs can be swapped)
get added to the cache.

> --
> Greg

Anubhav Rakshit

List admin:

[Linux ARM]     [Linux ARM MSM]     [Linux ARM Kernel]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

Add to Google Follow linuxarm on Twitter