Byobu reports different memory usage than `free` does

Asked by Serrano Pereira on 2011-05-25

Ubuntu 10.10
$ byobu --version
Screen version 4.00.03jw4 (FAU) 2-May-06


I don't understand why byobu reports different memory usage than `free` does. `free` gives the following output:

serrano@kano:~$ free -tm
             total used free shared buffers cached
Mem: 731 648 83 0 105 342
-/+ buffers/cache: 200 531
Swap: 733 0 733
Total: 1465 649 816

But Byobu reports the following memory info in the notification bar:

[Memory available, Memory used]
732MB, 27%

The 732MB comes close to the total memory, but it could as well be the Swap which is 0% in use. But the memory used, 27%, doesn't match any of the values returned by `free`. I come to the following percentages if I use the values returned by `free`:

Expected % used for memory + swap:

Expected % used for memory:

So where is that 27% coming from?

Question information

English Edit question
byobu Edit question
No assignee Edit question
Solved by:
Dustin Kirkland 
Last query:
Last reply:
Best Dustin Kirkland  (kirkland) said : #1

Hello, thanks for the question!

So the methodology used for calculated the amount of memory used is to
take 100 * the number of used buffers/cache and divide that by the sum
of the used and free buffers/cache.

So for your case above, thats: 100 * 200 / (200 + 531) =~ 27%

The -/+ buffers/cache line shows how much memory is used and free from
the perspective of the applications.

Hope that helps!


Thanks for the clear explanation!

Thanks Dustin Kirkland, that solved my question.