Skip to content

Instantly share code, notes, and snippets.

@otzy007
Created December 23, 2015 11:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save otzy007/bcf6a87c293fc87db2a4 to your computer and use it in GitHub Desktop.
Save otzy007/bcf6a87c293fc87db2a4 to your computer and use it in GitHub Desktop.
memory leaks check
pid = Process.pid
rss = `ps -eo pid,rss | grep #{pid} | awk '{print $2}'`.to_i
puts "MEMORY[#{pid}]: rss: #{rss}, live objects #{GC.stat[:heap_live_slots]}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment