diff -Nur -x '*.orig' -x '*.rej' smeserver-qpsmtpd-1.2.1/root/usr/local/bin/qplogsumm.pl mezzanine_patched_smeserver-qpsmtpd-1.2.1/root/usr/local/bin/qplogsumm.pl --- smeserver-qpsmtpd-1.2.1/root/usr/local/bin/qplogsumm.pl 2007-06-09 13:52:32.000000000 -0600 +++ mezzanine_patched_smeserver-qpsmtpd-1.2.1/root/usr/local/bin/qplogsumm.pl 2007-02-27 01:45:31.000000000 -0700 @@ -65,7 +65,7 @@ chomp(); next if m/^#/; next if m/^\s*$/; - my ($plug_name, $plug_epoch, $plug_cumulative) = split /\s/; + my ($plug_name, $plug_epoch, $plug_cumulative) = split /\s+/; my $c = { epoch => $plug_epoch, cum => $plug_cumulative, curr => 0 }; $disp{$plug_name} = $c; } @@ -91,10 +91,10 @@ my (@log_items) = split $FS, $log_part; my $disposition = $log_items[5]; next unless defined $disposition; - + if ($disp{$disposition}) { - $disp{$disposition}->{curr} = 1; + $disp{$disposition}->{curr} += 1; } else # a new plugin -- make a note of when it first appeared { @@ -123,9 +123,9 @@ # for my $c (keys %disp) { - $disp{$c}->{cum} = $disp{$c}->{curr}; - $current_total = $disp{$c}->{curr}; - $cumulative_total = $disp{$c}->{cum}; + $disp{$c}->{cum} += $disp{$c}->{curr}; + $current_total += $disp{$c}->{curr}; + $cumulative_total += $disp{$c}->{cum}; printf "%-30.30s %s %12d\n", $c, $disp{$c}->{epoch}, $disp{$c}->{cum}; } @@ -178,14 +178,14 @@ ; -# +# # Output per-plugin stats # print "# # Most Recent Logfile Cumulative Totals # Disposition (plugin) Total Avg/Day Total Avg/Day -# ----------------------------------------------------------------------------\n"; +# ----------------------------------------------------------------------------\n"; my $printf_format = "# %-30.30s %6d %3d%% %8d %10d %3d%% %8d\n"; @@ -193,7 +193,7 @@ { next if ($c eq 'LOGFILE_EPOCH'); - printf $printf_format, + printf $printf_format, $c, $disp{$c}->{curr}, $disp{$c}->{curr} / $current_total * 100, @@ -205,7 +205,7 @@ } print "# ----------------------------------------------------------------------------\n"; -printf $printf_format, +printf $printf_format, 'TOTALS', $current_total, 100, @@ -269,4 +269,3 @@ $secs %= 3600; $phrase .= sprintf "%d mins, %d secs", ($secs / 60), ($secs % 60); } -