Skip to content

Instantly share code, notes, and snippets.

@ryenski
Created January 13, 2010 19:09
Show Gist options
  • Save ryenski/276480 to your computer and use it in GitHub Desktop.
Save ryenski/276480 to your computer and use it in GitHub Desktop.
memory_usage = `ps -o rss= -p #{Process.pid}`.to_i # in kilobytes
# Source: http://laurelfan.com/2008/1/15/ruby-memory-usage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment