diff --git a/bin/quickcheck.pl b/bin/quickcheck.pl index 6bd32c7..ef03b59 100755 --- a/bin/quickcheck.pl +++ b/bin/quickcheck.pl @@ -114,18 +114,28 @@ sub check_progress { for my $line (split "\n",$lines) { chomp($line); my ($pid,$text,$since)=split '\|',$line; - my $hours=(time-$since)/60/60; - if ($hours>4 && $text !~ /idle, waiting/) { - if ($text !~ /BACKUP cfdl_imapspool_2/ || $hours>5) { - fail ("single job running for over 4 hours : $text since ".localtime($since)); - $fail++; + $text =~ /idle, waiting/ and next; + my $hours=(time - $since) / 60 / 60; + if ($hours > 10) { + if ($text =~ /^BACKUP I/) { + fail("INCREMENTAL job running for over 10 hours: $text since" . localtime($since)); + } elsif ($text =~ /^EXPIRE/) { + fail("EXPIRE job running for over 10 hours: $text since" . localtime($since)); + } + if ($hours > 72) { + if ($text =~ /^BACKUP F/) { + fail("FULL job running for over 3 days $text since" . localtime($since)); + } elsif ($text =~ /^BALANCE/) { + fail ("BALANCE job running for over 3 days : $text since ".localtime($since)); + } elsif ($text =~ /^BACKUP %/) { + fail("REFRESH job running for over 3 days $text since" . localtime($since)); + } } } } - $fail or ok('no jobs running for over 4 (or 5) hours'); + $fail or ok('all known jobs in their time limits'); } - check_processes(); check_space(); check_job('cfdl_imapspool_2',1600) if $hostname eq 'done';