question about /proc/meminfo (Inactive Memory)

Kristian Erik Hermansen kristian.hermansen-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Tue Feb 5 00:42:13 UTC 2008


On Feb 4, 2008 3:51 PM, Dave Germiquet <davegermiquet-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org> wrote:
> I'm using my system and I occasionally use the cat /proc/meminfo |
> grep Inactive to see how much memory I use.
>
> I am guessing thats how much memory that I have available, however I
> have recently realized that Active/InActive memory doesn't equal up to
> MemTotal.
>
> Not only that, but Buffers+Cached+MemFree doesn't equal Inactive memory
>
> If I would like to know if my system is running out of memory would I
> use MemFree+Cached+Buffers Or would I use the Inactive Memory?
>
> If I should still use Inactive why are the results different?

Ah, I ran into this issue when build the Cisco Computational Cloud
project back in Boston :-)  The reason is that you are not seeing
memory that is being utilized outside of user space, iirc.  Trying to
determine what is active or inactive is tricky due to the way the
kernel tries to "do what's right/efficient" for a user space
application.  I remember I spent a lot of time looking into it,
grepping source code, and finally found some way to get a
semi-accurate perspective on all of it, although the hack was pretty
ugly.  I think you needed to be seteuid root to get some of the info I
requested and it was still not as accurate as I wanted.  However, it
did moderately well.  I could try and dig up the relevant C code, but
I can't give you the source as it is Cisco proprietary stuff.  Let me
search around...
-- 
Kristian Erik Hermansen
"Know something about everything and everything about something."
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list