Linux – Graphing Process Memory Usage

graphlinuxmemoryprocess

I'm trying to diagnose a memory leak in a process, and looking for a tool to graph its memory usage over time.

Is there any tool on Linux that supports diagramming in a form similar to Windows PerfMon?

I tried using IBM virtual assistant, but it works only on 32-bit, while I have 64-bit platform.

Thanks.

Best Answer

Quick hack:

for((i=0;;++i)) { echo $i $(grep VmSize /proc/$(pidof firefox-bin)/status | grep -o '[0-9]*'); sleep 1 || break; } > data
^C
graph -T X data

The same could be done for things other than "VmSize".