proc_env example

This commit is contained in:
Doug MacEachern 2007-09-15 21:40:58 +00:00
parent 2a1f3f31f7
commit 59a4e8d773
1 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,14 @@
require 'rbsigar'
def output(sigar, pid)
env = sigar.proc_env(pid)
env.each do |key, val|
puts key + "=" + val
end
end
sigar = Sigar.new
ARGV.each do |pid|
output(sigar, pid.to_i)
end