Fetching contributors…
Cannot retrieve contributors at this time
82 lines (62 sloc) 1.88 KB
= Description
A Ruby interface for gathering process table information. This is a pure
Ruby implementation that reads data out of your /proc filesystem.
= Synopsis
require 'sys/proctable'
include Sys
# Everything{ |p|
puts p.comm
# Just one process
p =
puts p.comm
# Return the results as an array of ProcTableStructs
a =
a.each do |p|
= Constants
Returns the current version number for this library (as a string).
= Class Methods
Returns an array of fields available on the current OS.{ |s| ... }
If no pid's or processes are included as arguments, in block form it
returns a struct of type ProcTableStruct for every process in the proc
table. Otherwise it returns an array of ProcTableStruct's.
If a process id is provided, a single ProcTable struct is returned, or
nil if the pid is not found.
= Exception Classes
ProcTable::Error < StandardError
Raised if the /proc field is unreadable and/or unmounted.
= Supported fields
You can view the supported fields with the "fields()" class method.
= Future Plans
None at this time. Please post any feature requests on the project page
= Known Bugs
None known. Please log any bugs on the project page at
= License
Artistic 2.0
= Copyright
(C) 2003-2009 Daniel J. Berger
All Rights Reserved
= Warranty
This package is provided "as is" and without any express or
implied warranties, including, without limitation, the implied
warranties of merchantability and fitness for a particular purpose.
= Author
Daniel J. Berger
= See Also
ps, proc(5)