From 1030ca3630a754b6be7b316516a7f625568e2463 Mon Sep 17 00:00:00 2001 From: Donald Buczek Date: Fri, 4 Apr 2025 08:57:45 +0200 Subject: [PATCH] quickcheck: Change time limits We now have seperate FULL and INCREMENTAL backup jobs. Also we have the new REFRESH ('%') backup job. The 4/5 hours time limit was to low anyway, so implement new time limits: INCREMENTAL : 10 hours EXPIRE job : 10 hours FULL : 3 days BALANCE : 3 days REFRESH : 3 days --- bin/quickcheck.pl | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) 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';