sigar/bindings/ruby/examples/penv.rb

15 lines
192 B
Ruby
Raw Normal View History

2010-01-18 10:26:31 +08:00
require 'sigar'
2007-09-16 05:40:58 +08:00
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|
2009-03-16 03:33:54 +08:00
output(sigar, pid)
2007-09-16 05:40:58 +08:00
end