|
|
@ -38,7 +38,7 @@ sub action |
|
|
|
|
|
|
|
|
|
|
|
# Start loop |
|
|
|
# Start loop |
|
|
|
foreach my $host ( GetUserHosts(1) ) { |
|
|
|
foreach my $host ( GetUserHosts(1) ) { |
|
|
|
my($fullDur, $incrCnt, $incrAge, $fullSize, $fullRate, $reasonHilite, |
|
|
|
my($incrCnt, $incrAge, $reasonHilite, |
|
|
|
$lastAge, $lastAgeColor, $tempState, $tempReason, $lastXferErrors, $lastXferErrorsColor); |
|
|
|
$lastAge, $lastAgeColor, $tempState, $tempReason, $lastXferErrors, $lastXferErrorsColor); |
|
|
|
my($shortErr); |
|
|
|
my($shortErr); |
|
|
|
my @Backups = $bpc->BackupInfoRead($host); |
|
|
|
my @Backups = $bpc->BackupInfoRead($host); |
|
|
@ -57,8 +57,6 @@ sub action |
|
|
|
$fullCnt++; |
|
|
|
$fullCnt++; |
|
|
|
if ( $fullAge < 0 || $Backups[$i]{startTime} > $fullAge ) { |
|
|
|
if ( $fullAge < 0 || $Backups[$i]{startTime} > $fullAge ) { |
|
|
|
$fullAge = $Backups[$i]{startTime}; |
|
|
|
$fullAge = $Backups[$i]{startTime}; |
|
|
|
$fullSize = $Backups[$i]{size} / (1024 * 1024); |
|
|
|
|
|
|
|
$fullDur = $Backups[$i]{endTime} - $Backups[$i]{startTime}; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} elsif ( $Backups[$i]{type} eq "incr" ) { |
|
|
|
} elsif ( $Backups[$i]{type} eq "incr" ) { |
|
|
|
$incrCnt++; |
|
|
|
$incrCnt++; |
|
|
@ -88,18 +86,14 @@ sub action |
|
|
|
} |
|
|
|
} |
|
|
|
if ( $fullAge < 0 ) { |
|
|
|
if ( $fullAge < 0 ) { |
|
|
|
$fullAge = ""; |
|
|
|
$fullAge = ""; |
|
|
|
$fullRate = ""; |
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$fullAge = sprintf("%.1f", (time - $fullAge) / (24 * 3600)); |
|
|
|
$fullAge = sprintf("%.1f", (time - $fullAge) / (24 * 3600)); |
|
|
|
$fullRate = sprintf("%.2f", |
|
|
|
|
|
|
|
$fullSize / ($fullDur <= 0 ? 1 : $fullDur)); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
if ( $incrAge < 0 ) { |
|
|
|
if ( $incrAge < 0 ) { |
|
|
|
$incrAge = ""; |
|
|
|
$incrAge = ""; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$incrAge = sprintf("%.1f", (time - $incrAge) / (24 * 3600)); |
|
|
|
$incrAge = sprintf("%.1f", (time - $incrAge) / (24 * 3600)); |
|
|
|
} |
|
|
|
} |
|
|
|
$fullSize = sprintf("%.2f", $fullSize / 1024); |
|
|
|
|
|
|
|
$incrAge = " " if ( $incrAge eq "" ); |
|
|
|
$incrAge = " " if ( $incrAge eq "" ); |
|
|
|
# Color for errors |
|
|
|
# Color for errors |
|
|
|
$lastXferErrors = $Backups[@Backups-1]{xferErrs} if ( @Backups ); |
|
|
|
$lastXferErrors = $Backups[@Backups-1]{xferErrs} if ( @Backups ); |
|
|
|