sigar/bindings/ruby/examples/penv.rb
2009-03-15 12:33:54 -07:00

15 lines
194 B
Ruby

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)
end