lastAge var

master
Heuzef 5 years ago
parent e621227685
commit 50fb7a526d
  1. 4
      backuppc_check.pl

@ -81,7 +81,7 @@ if ( $host ) {
$json->{enabled} = ( $conf->{BackupsDisable} > 0 ) ? 0 : 1; $json->{enabled} = ( $conf->{BackupsDisable} > 0 ) ? 0 : 1;
$json->{total_size} = $sizes->sum + $json->{full_size} - 2 * $new_size_of_last_full; $json->{total_size} = $sizes->sum + $json->{full_size} - 2 * $new_size_of_last_full;
$json->{age} = time - $bpc_info[$i]->{startTime}; $json->{age} = time - $bpc_info[$i]->{startTime};
$lastAge = sprintf("%.1f", (time - $json->{age}) / (24 * 3600));
$json->{max_errors} = $conf->{MaxXferError} || 0; $json->{max_errors} = $conf->{MaxXferError} || 0;
} }
} elsif ( $entity ) { } elsif ( $entity ) {
@ -151,7 +151,7 @@ EOF
# Print results # Print results
print("\n----------------\n"); print("\n----------------\n");
print("Last Backup : $json->{age}"); print("Last Backup : $lastAge");
print("\n"); print("\n");
print("Errors : $json->{errors}"); print("Errors : $json->{errors}");
print("\n"); print("\n");

Loading…
Cancel
Save