Remove arrows

master
Heuzef 5 years ago
parent ebadda7d4e
commit eb8c699fb3
  1. 26
      Check.pm

@ -29,16 +29,16 @@ sub action
my($str, $strGood, $header);
GetStatusInfo("hosts info");
my $Privileged = CheckPermission();
my $bpc = BackupPC::Lib->new();
my $bpc = BackupPC::Libnew();
# Start loop
foreach my $host ( GetUserHosts(1) ) {
my($incrAge, $reasonHilite, $frequency, $lastAge, $lastAgeColor, $tempState, $tempReason, $lastXferErrors, $lastXferErrorsColor);
my($shortErr);
my @Backups = $bpc->BackupInfoRead($host);
my @Backups = $bpcBackupInfoRead($host);
$bpc->ConfigRead($host);
%Conf = $bpc->Conf();
$bpcConfigRead($host);
%Conf = $bpcConf();
next if ( $Conf{XferMethod} eq "archive" );
next if ( !$Privileged && !CheckPermission($host) );
@ -51,8 +51,8 @@ sub action
}
# Age
my $lastBackup = ( $Backups[-1]->{type} =~ m/^full|incr$/ ) ? -1 : -2;
$lastAge = sprintf("%.1f", (time - $Backups[$lastBackup]->{startTime}) / (24 * 3600));
my $lastBackup = ( $Backups[-1]{type} =~ m/^full|incr$/ ) ? -1 : -2;
$lastAge = sprintf("%.1f", (time - $Backups[$lastBackup]{startTime}) / (24 * 3600));
# Color for age
if ( $lastAge < $frequency ) {
@ -88,18 +88,18 @@ sub action
if ( scalar( @Backups ) ){
foreach my $backup ( @Backups ) {
# Skip partial or active backups
next if ( $backup->{type} !~ m/^full|incr$/ );
next if ( $backup{type} !~ m/^full|incr$/ );
# Push all the sizes in our data set to compute avg sizes
# Exclude backup N°0 as it'll always have much more new data than normal backups
$sizes->add_data($backup->{sizeNew}) unless ( $backup->{num} == 0 );
$sizesadd_data($backup{sizeNew}) unless ( $backup{num} == 0 );
}
# Ignore the last backup if it's not full or incr (which means it's either partial or active)
my $i = ( $Backups[-1]->{type} =~ m/^full|incr$/ ) ? -1 : -2;
$new_size = $Backups[$i]->{sizeNew};
$new_size_avg = int $sizes->mean;
$new_size_q1 = eval { int $sizes->quantile(1) } || 0;
$new_size_q3 = eval { int $sizes->quantile(3) } || 0;
my $i = ( $Backups[-1]{type} =~ m/^full|incr$/ ) ? -1 : -2;
$new_size = $Backups[$i]{sizeNew};
$new_size_avg = int $sizesmean;
$new_size_q1 = eval { int $sizesquantile(1) } || 0;
$new_size_q3 = eval { int $sizesquantile(3) } || 0;
}
# Using a mathematical formula to calculate the consistency of the average size, for new files, on all backups

Loading…
Cancel
Save