X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=bin%2Fmonitor;h=8dac70056e89e17385042ed20bbcb50225b10975;hp=2f83d87fb25e744871b087373c02560ef14302c0;hb=f73a37bd1dfd6f8e5cd497b8ac2843a7b8b1247b;hpb=7075c6179e16bf0a4c6358cbfbb0a42fcb890f39 diff --git a/bin/monitor b/bin/monitor index 2f83d87fb..8dac70056 100755 --- a/bin/monitor +++ b/bin/monitor @@ -41,12 +41,15 @@ while (1) { my(undef, $load, undef) = report('load'); my($free) = report('freememory'); + warn "free is $free and wantfree is $wantfree\n" if $DEBUG > 1; + warn "load is $load and wantload is $wantload\n" if $DEBUG > 1; + warn "last is $last\n" if $DEBUG > 1; + unless( defined($load) && $load < $wantload && defined($free) && $free > $wantfree || ( time() < $last + 1800 && $alerts > 2 ) ) { warn localtime(). ": $machine has load of $load and $free kB free memory\n"; - warn "last is $last and alerts is $alerts\n"; $alerts++; $alerts = 0 if time() > $last + 1800; $last = time();