[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Displaying the load the server is under?

Jeremy Tregunna

7/15/2006 8:42:00 PM


On 15-Jul-06, at 4:31 PM, Ben Johnson wrote:

> On my program I want to display the load the server is currently
> under. The application I'm writing can get pretty intense and it
> based on a number of factors. I want the user to be able to tell
> when they are using the program beyond the server's limits. Is this
> possible? Maybe show the percent of the CPU being used, how much
> ram is being used, etc.

Not really... If you limit CPU usage to a certain percentage,
percentage of CPU usage isn't going to be helpful. If you don't,
other factors could (and will) almost always taint that result. The
same caveat applies to testing memory usage.

Also, the load displayed by the unix 'w' program (uptime is usually a
hard link to this) will display differently based on different
factors on different unix operating systems. FreeBSD for example uses
the total number of waiting processes to gauge system load, which may
not be the most accurate. Calculating load is a difficult beast. If
perhaps you could tell us what exactly your program does, we may be
able to offer you better solutions.

> Ben Johnson

--
Jeremy Tregunna
jtregunna@blurgle.ca


"One serious obstacle to the adoption of good programming languages
is the notion that everything has to be sacrificed for speed. In
computer languages as in life, speed kills." -- Mike Vanier