Archive

Posts Tagged ‘Ruby’

WebFaction Memory Usage Script

May 25th, 2009

I have knocked up a simple Ruby script (my first – please be gentle) to parse the output of ps -u -o pid,rss,command and convert the KB values to MB for easier reading.

The script recurses through each process and displays the process ID, memory usage (in megabytes) and the command that it’s executing. It then displays the total memory usage at the end.

Download
memusage.rb ( — RB file)

Nick Other ,