Skip to content

Instantly share code, notes, and snippets.

@gerhard
Created March 22, 2012 17:09
Show Gist options
  • Save gerhard/2159874 to your computer and use it in GitHub Desktop.
Save gerhard/2159874 to your computer and use it in GitHub Desktop.
Find total RSS memory used by all ruby processes
$ ps aux | awk '/[0-9] ruby/ { print $0; rss += $6 } END { print "TOTAL RSS: " rss/1024 " MB" }'
# Don't forget about resque ones
$ ps aux | awk '/[0-9] ruby|[0-9] resque/ { print $0; rss += $6 } END { print "TOTAL RSS: " rss/1024 " MB" }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment