LinuxProcess
LinuxProcess is a quick wrapper around the proc filesystem which makes it a little easier to work with processes in Ruby. You can find processes by name or ID, see their running state, environment, memory status, etc.
Instantiate a process with LinuxProcess.new(pid), or by using LinuxProcess.named(string). For example:
firefox = LinuxProcess.named('firefox-bin').first
=> #<LinuxProcess:0xb7c6cc78 @pid=27252>
firefox.size
=> 91308 # Total pages
firefox.parent.name
=> "run-mozilla.sh" # Executable name of parent process
Copyright © 2003—2010
Aphyr