LinuxProcMem

Get memory usage of a process including all child-processes (linux only).

Uses get_process_mem gem for reading the memory from proc filesystem and adds a small layer to handle the child processes.

Installation

Add this line to your application's Gemfile:

gem 'linux_proc_mem'

And then execute:

$ bundle

Or install it yourself as:

$ gem install linux_proc_mem

Usage

require 'linux_proc_mem'
pid = 1234
bytes = LinuxProcMem.get_bytes(pid)
puts "process #{pid} including childs is using #{bytes} bytes of system memory"

Contributing

  1. Fork it ( https://github.com/klausmeyer/linux_proc_mem/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request