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

19 lines
281 B
Ruby

require 'rbsigar'
def output(sigar, pid)
args = sigar.proc_args(pid)
exe = sigar.proc_exe(pid);
puts "exe=" + exe.name
puts "cwd=" + exe.cwd
args.each do |arg|
puts " " + "=>" + arg + "<="
end
end
sigar = Sigar.new
ARGV.each do |pid|
output(sigar, pid)
end