Does anyone know of a tool to visually show the memory usage of a selected process on Ubuntu?
ps aux will show a numerical snapshot, but I’d really like a line I can watch change as I hammer the process and hopefully see unexpected behaviours.
Has anyone got any suggestions?
I couldn’t find any real tools to do it.
But I have found a neat small set of scripts that’ll do it.
Using this little bash loop to do the logging:
This will create a nice little log file of memory usage called /tmp/mem.log. Then it generates an image of the data with gnuplot using the following script (put this in
/tmp/show_mem.plt):Then opening the image with the default GNOME image viewer it keeps reloading the image when it changes. So if all the above loop is backgrounded it will appear that you have an amazing memory usage graphing tool running within an image viewer 🙂
The process I’m tracking right now looks like this:

It looks like I do have some memory issues 🙁
Much of this was ripped from http://brunogirin.blogspot.com.au/2010/09/memory-usage-graphs-with-ps-and-gnuplot.html, credit where it is due.