import torrus 1.0.9
[freeside.git] / bin / monitor
index 2f83d87..8dac700 100755 (executable)
@@ -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();