sigar/bindings/ruby/examples/penv.rb
2010-01-17 19:00:26 -08:00

15 lines
192 B
Ruby

require 'sigar'
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