From: jackster the jackle Date: 2007-12-14T07:05:07+09:00 Subject: Re: Showing Running Processes in variable Thanks for the replies but they don't seem to work in Rails. Dan, Is sys/proctable a gem that I can install? ..if so, do you have link? thanks jackster Daniel Berger wrote: > jackster the jackle wrote: >> I want to capture the list of running processes on my computer. I am to >> get all the data into my variable with a simple system call: >> >> x = `ps -el` >> >> My problem comes when I want to display the data back out in a legible >> format that makes sense. >> >> What is the best way to do this? > > I recommend sys-proctable instead. > > require 'sys/proctable' > include Sys > > ProcTable.ps do |process| > p process.cmdline > ... > end > > Regards, > > Dan -- Posted via http://www.ruby-forum.com/.