On 20 September 2010 08:35, raid fifa <[email protected]> wrote:

> !179 $ free -m
>              total       used       free     shared    buffers     cached
> Mem:         15925      15837         88          0         76       7408
> -/+ buffers/cache:       8352       7573
> Swap:         8189          0       8189
>
> top - 03:34:23 up 29 days,  6:15,  5 users,  load average: 3.92, 3.72, 2.70
> Tasks: 172 total,   1 running, 171 sleeping,   0 stopped,   0 zombie
> Cpu(s): 23.2%us,  3.1%sy,  0.0%ni, 63.4%id,  9.7%wa,  0.0%hi,  0.6%si,
> 0.0%st
> Mem:  16307832k total, 16222676k used,    85156k free,    78732k buffers
> Swap:  8385920k total,      148k used,  8385772k free,  8372932k cached


Which numbers do you think are inconsistent?   There's a minor discrepancy
between the "free -m" free and the top free (85156/1024 == 83 vs 88) but
those 5MB could just be down to timing.

Both free and top get their statistics from /proc/meminfo so any
inconsistencies you think you're seeing are simply in the way that the
utility chooses to represent the information.  As Morgan Langley says,
though, the "+-/ buffers/cached" line in the output of free is sometimes
confusing, but it just subtracts or adds 76+7408 from the "used" and "free"
values respectively (there's a bit of a rounding error in there though).
The premise here is that "buffers" and "cached" can be quickly freed if
needed -- that's only true up to a point.

If you want to know exactly what values from /proc/meminfo are being used
and how then you'll have to dig into the source code of free and top.  After
that you're down to getting the developers to justify their choices; and
they may not know!

jch
_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to