[lugip] losing memory

Thomas Pfau pfau at nbpfaus.net
Sun Sep 14 14:07:10 EDT 2008


I'm issuing commands on the box using a perl script and Net::Telnet.  I 
can then use perl to filter the output.  I'm doing the equivalent of 
your command below.  I display the output of 'free' followed by each 
process's name and rss value.  I'm also summing the rss values and 
displaying the total at the end.  I'm watching free memory fall without 
seeing any change in any process rss value.

I have a feeling it's a kernel buffer of some sort.  What kernel buffers 
are dynamically allocate from free memory and how can I track their 
allocation?

linux what's using memoryRod Nayfield wrote:
>
> so /proc/<pid>/stat will show your RSS assuming that your kernel isn't 
> really ancient
>
> It is the 24th field in that file on my (2.6.18) kernel.  It might 
> differ for your kernel.
>
>
> So I can do:
>
> # cat /proc/[0-9]*/stat | awk '{print $2 "  "  $24}'|sort -rnk2  | head
>
> to show the top ten consumers of RSS (numbers are in pages)



More information about the Lugip mailing list