Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: Load Monitor

by tfrayner (Curate)
on Nov 02, 2001 at 20:57 UTC ( #122849=note: print w/ replies, xml ) Need Help??

in reply to Load Monitor

Correct me if I'm wrong, but shouldn't you be checking $loads[0] rather than $loads[1]? Nothing else immediately stands out as being wrong :-)



Update: Okay, there are a few other problems. Most of them have been discussed below, so I won't reiterate (or is that preiterate?). Note however that you set $config{alert} but actually check $config{notify}. (Insert usual spiel about use strict here :-P)

I also rewrote the /proc/loadavg access thusly:

open (LOADAVG,"/proc/loadavg"); while (<LOADAVG>) { @loads = split(/ /); }
Do all that and it seems to work, on a one check per run basis.

Comment on Re: Load Monitor
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://122849]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2015-11-29 07:09 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (748 votes), past polls