Afficher un message
Vieux 01/04/2008, 16h56   #2
pat eyler
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: linux: getting the "load" values without using "top"

On Tue, Apr 1, 2008 at 8:49 AM, James Dinkel <jdinkel@gmail.com> wrote:
> I would like to get some of the information provided by the "top"
> command into my ruby program, in particular the "load" values. The only
> way I can think of is to use popen3 to run "top -n 1" and parse the
> output, but I would like to not have to call an external command and do
> it using pure ruby.


look at the contents of /proc/loadavg



> --
> Posted via http://www.ruby-forum.com/.
>
>




--
thanks,
-pate
-------------------------
Duty makes us do things, Love make us do things well.
http://on-ruby.blogspot.com http://on-erlang.blogspot.com
http://on-soccer.blogspot.com

  Réponse avec citation
 
Page generated in 0,05452 seconds with 9 queries