sigar/bindings/ruby/examples/pargs.rb
2007-09-15 21:40:45 +00:00

19 lines
286 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.to_i)
end