+ if ( $cmd =~ /^BackupPC_nightly\s/ ) {
+ $BackupPCNightlyJobs--;
+ #print(LOG $bpc->timeStamp, "BackupPC_nightly done; now"
+ # . " have $BackupPCNightlyJobs running\n");
+ if ( $BackupPCNightlyJobs <= 0 ) {
+ #
+ # Last BackupPC_nightly has finished
+ #
+ $BackupPCNightlyJobs = 0;
+ $RunNightlyWhenIdle = 0;
+ $CmdJob = "";
+ #
+ # Combine the 16 per-directory results
+ #
+ for my $p ( qw(pool cpool) ) {
+ $Info{"${p}FileCnt"} = 0;
+ $Info{"${p}DirCnt"} = 0;
+ $Info{"${p}Kb"} = 0;
+ $Info{"${p}Kb2"} = 0;
+ $Info{"${p}KbRm"} = 0;
+ $Info{"${p}FileCntRm"} = 0;
+ $Info{"${p}FileCntRep"} = 0;
+ $Info{"${p}FileRepMax"} = 0;
+ $Info{"${p}FileCntRename"} = 0;
+ $Info{"${p}FileLinkMax"} = 0;
+ $Info{"${p}Time"} = 0;
+ for ( my $i = 0 ; $i < 16 ; $i++ ) {
+ $Info{"${p}FileCnt"}
+ += $Info{pool}{$p}[$i]{FileCnt};
+ $Info{"${p}DirCnt"}
+ += $Info{pool}{$p}[$i]{DirCnt};
+ $Info{"${p}Kb"}
+ += $Info{pool}{$p}[$i]{Kb};
+ $Info{"${p}Kb2"}
+ += $Info{pool}{$p}[$i]{Kb2};
+ $Info{"${p}KbRm"}
+ += $Info{pool}{$p}[$i]{KbRm};
+ $Info{"${p}FileCntRm"}
+ += $Info{pool}{$p}[$i]{FileCntRm};
+ $Info{"${p}FileCntRep"}
+ += $Info{pool}{$p}[$i]{FileCntRep};
+ $Info{"${p}FileRepMax"}
+ = $Info{pool}{$p}[$i]{FileRepMax}
+ if ( $Info{"${p}FileRepMax"} <
+ $Info{pool}{$p}[$i]{FileRepMax} );
+ $Info{"${p}FileCntRename"}
+ += $Info{pool}{$p}[$i]{FileCntRename};
+ $Info{"${p}FileLinkMax"}
+ = $Info{pool}{$p}[$i]{FileLinkMax}
+ if ( $Info{"${p}FileLinkMax"} <
+ $Info{pool}{$p}[$i]{FileLinkMax} );
+ $Info{"${p}Time"} = $Info{pool}{$p}[$i]{Time}
+ if ( $Info{"${p}Time"} <
+ $Info{pool}{$p}[$i]{Time} );
+ }
+ printf(LOG "%s%s nightly clean removed %d files of"
+ . " size %.2fGB\n",
+ $bpc->timeStamp, ucfirst($p),
+ $Info{"${p}FileCntRm"},
+ $Info{"${p}KbRm"} / (1000 * 1024));
+ printf(LOG "%s%s is %.2fGB, %d files (%d repeated, "
+ . "%d max chain, %d max links), %d directories\n",
+ $bpc->timeStamp, ucfirst($p),
+ $Info{"${p}Kb"} / (1000 * 1024),
+ $Info{"${p}FileCnt"}, $Info{"${p}FileCntRep"},
+ $Info{"${p}FileRepMax"},
+ $Info{"${p}FileLinkMax"}, $Info{"${p}DirCnt"});
+ }
+ }
+ } else {
+ $CmdJob = "";
+ }