From 50fb7a526d55050c9e6a5b04d5a22735a28c46c5 Mon Sep 17 00:00:00 2001 From: Heuzef Date: Wed, 25 Sep 2019 11:00:36 +0200 Subject: [PATCH] lastAge var --- backuppc_check.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backuppc_check.pl b/backuppc_check.pl index bdcc590..7f8c31d 100644 --- a/backuppc_check.pl +++ b/backuppc_check.pl @@ -81,7 +81,7 @@ if ( $host ) { $json->{enabled} = ( $conf->{BackupsDisable} > 0 ) ? 0 : 1; $json->{total_size} = $sizes->sum + $json->{full_size} - 2 * $new_size_of_last_full; $json->{age} = time - $bpc_info[$i]->{startTime}; - + $lastAge = sprintf("%.1f", (time - $json->{age}) / (24 * 3600)); $json->{max_errors} = $conf->{MaxXferError} || 0; } } elsif ( $entity ) { @@ -151,7 +151,7 @@ EOF # Print results print("\n----------------\n"); -print("Last Backup : $json->{age}"); +print("Last Backup : $lastAge"); print("\n"); print("Errors : $json->{errors}"); print("\n");