try share var

master
Heuzef 5 years ago
parent 776d5a27b3
commit 0064249218
  1. 34
      backuppc_check.pl

@ -34,6 +34,7 @@ if ( $host ) {
my $conf = { %$mainConf, %$hostConf }; my $conf = { %$mainConf, %$hostConf };
my $age = -1; my $age = -1;
$json = { $json = {
share => 0,
bkp => 0, bkp => 0,
last_age => 0, last_age => 0,
errors => 0, errors => 0,
@ -65,6 +66,7 @@ if ( $host ) {
$json->{errors} = $bpc_info[$i]->{xferErrs}; $json->{errors} = $bpc_info[$i]->{xferErrs};
$json->{new_size} = $bpc_info[$i]->{sizeNew}; $json->{new_size} = $bpc_info[$i]->{sizeNew};
$json->{share} = $bpc_info[$i]->{share};
$json->{new_size_avg} = int $sizes->mean; $json->{new_size_avg} = int $sizes->mean;
$json->{new_size_median} = int $sizes->median; $json->{new_size_median} = int $sizes->median;
$json->{new_size_q1} = eval { int $sizes->quantile(1) } || 0; $json->{new_size_q1} = eval { int $sizes->quantile(1) } || 0;
@ -144,37 +146,7 @@ print("toobig : $toobig");
print("\n"); print("\n");
print("toosmall : $toosmall"); print("toosmall : $toosmall");
print("\n"); print("\n");
print("client : $bpc_info[$i]->{client};"); print("share : $json->{share}");
print("\n");
print("xferOK : $bpc_info[$i]->{xferOK};");
print("\n");
print("host : $bpc_info[$i]->{host};");
print("\n");
print("user : $bpc_info[$i]->{user};");
print("\n");
print("share : $bpc_info[$i]->{share};");
print("\n");
print("XferMethod : $bpc_info[$i]->{XferMethod};");
print("\n");
print("HostList : $bpc_info[$i]->{HostList};");
print("\n");
print("BackupList : $bpc_info[$i]->{BackupList};");
print("\n");
print("archiveloc : $bpc_info[$i]->{archiveloc};");
print("\n");
print("parfile : $bpc_info[$i]->{parfile};");
print("\n");
print("compression : $bpc_info[$i]->{compression};");
print("\n");
print("compext : $bpc_info[$i]->{compext};");
print("\n");
print("splitsize : $bpc_info[$i]->{splitsize};");
print("\n");
print("sshPath : $bpc_info[$i]->{sshPath};");
print("\n");
print("type : $bpc_info[$i]->{type};");
print("\n");
print("cmdType : $bpc_info[$i]->{cmdType};");
print("\n----------------\n"); print("\n----------------\n");
# /Debug # /Debug

Loading…
Cancel
Save