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
- Fork it ( https://github.com/klausmeyer/linux_proc_mem/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request