OpenWrt Forum Archive

Topic: Free's and htop's data are different (quite a lot)

The content of this topic has been archived on 6 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I log in like every day from my work on my router, so I can IRC and play around a bit (and show off to colleagues tongue). The box is now up for almost four days (I only recently finished configuration) and free showed an increasing memory usage, every time I logged in. First it was below 20 MB (out of 32 MB RAM), with like 2 MB cached. Now it is up to 25 MB already.

root@Zeus:~# free 
              total       used         free       shared      buffers
Mem:      30512     25404       5108     0              2052
Swap:     0            0              0
Total:     30512      25404       5108

I was worried as to what could be eating my precious RAM, so I installed htop to get a second opinion. Htop shows me I am using a meagre 12 MB (If i interpret free's numbers correctly I have 25 MB used minus 2 MB buffers, makes 23 MB still). Check the screenie here.

Interpreting free's output is usually no problem for me on a normal (non-embedded) linux box, are my eyes deceiving me, or is there something wrong with free? I know it's no independent binary, it links to busybox.

Any pointers?

Nevermind, looks like busybox doesn't support cached memory.

Borromini wrote:

Swap:     0            0              0

Your swap is not correctly mounted.

The discussion might have continued from here.