memory being used?

Rashkae ubuntu at
Mon Sep 5 17:19:42 UTC 2011

On 09/05/2011 01:07 PM, Noah wrote:
> Hi there,
> I would like to look at what programs are utilizing what memory.
> :~$ free -m
>              total       used       free     shared    buffers     cached
> Mem:           768        745         22          0          5        265
> -/+ buffers/cache:        474        293
> Swap:         1535        165       1370
> currently I see that I am riding my memory almost 100% utilized.  I 
> want to know what program is using that memory and how it is 
> allocated.  how can I do that?
> Cheers,
> Noah

There's no easy answer in demand paging systems with shared memory like 
Linux.  Without going into deep magic (details of which I forget, but 
involving looking up the various memory mapping of processes in the 
/prcc system), the best you can do is something like "sudo ps axe" and 
examine the processes with the larger RSS value as culprits.  However, 
the assumption you are making in your cases in incorrect.  Processes are 
only occupying  a little over half your ram (with a humble 165MB of swap 
being used.).  The rest is cache.  Available and free memory will always 
be used as Cache, so memory should always 'fill' very quickly.

More information about the ubuntu-users mailing list