From: "M. Edward (Ed) Borasky" Date: 2008-04-02T00:02:46+09:00 Subject: Re: linux: getting the "load" values without using "top" pat eyler wrote: > On Tue, Apr 1, 2008 at 8:49 AM, James Dinkel 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/. >> >> > > > Yeah ... that will work. But I'm curious why the OP's application cares about the load averages. My experience has been that there isn't a lot to be gained from it. "Real" load balancing is a bit more complicated, if that's what he's trying to do.