From: Steve Campbell Date: Wed, 16 Feb 2005 15:49:36 +0000 (+0000) Subject: Added Gregor Herrmann's code to show the average sizes in the HTML top tables. X-Git-Tag: exim-4_50~9 X-Git-Url: https://git.exim.org/users/heiko/exim.git/commitdiff_plain/50adf73a391c3c0c6485d531c315257288168696?ds=inline Added Gregor Herrmann's code to show the average sizes in the HTML top tables. --- diff --git a/src/src/eximstats.src b/src/src/eximstats.src index ed042e451..e013b9713 100644 --- a/src/src/eximstats.src +++ b/src/src/eximstats.src @@ -1,5 +1,5 @@ #!PERL_COMMAND -w -# $Cambridge: exim/src/src/eximstats.src,v 1.4 2004/12/21 11:33:55 steve Exp $ +# $Cambridge: exim/src/src/eximstats.src,v 1.5 2005/02/16 15:49:36 steve Exp $ # Copyright (c) 2001 University of Cambridge. # See the file NOTICE for conditions of use and distribution. @@ -193,6 +193,9 @@ # # 2004-12-20 V1.35 Wouter Verhelst # Pie charts by volume were actually generated by count. Fixed. +# +# 2005-02-07 V1.36 Gregor Herrmann / Steve Campbell +# Added average sizes to HTML Top tables. =head1 NAME @@ -419,7 +422,7 @@ use vars qw($COLUMN_WIDTHS); @days_per_month = (0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334); $gig = 1024 * 1024 * 1024; -$VERSION = '1.35'; +$VERSION = '1.36'; # How much space do we allow for the Hosts/Domains/Emails/Edomains column headers? $COLUMN_WIDTHS = 8; @@ -1003,25 +1006,36 @@ if ($html) { print "\n"; print "
\n"; print "\n"; - print "\n"; + print "\n"; # Align non-local addresses to the right (so all the .com's line up). # Local addresses are aligned on the left as they are userids. my $align = ($text !~ /local/i) ? 'right' : 'left'; - $format = "\n"; + $format = "\n"; } else { printf("%s\n%s\n\n", $temp, "-" x length($temp)); $format = "%7d %10s %s\n"; } -my($key,$htmlkey); +my($key,$htmlkey,$rounded_volume,$rounded_average,$count,$data,$gigs); foreach $key (top_n_sort($topcount,$m_count,$m_data_gigs,$m_data)) { if ($html) { $htmlkey = $key; $htmlkey =~ s/>/\>\;/g; $htmlkey =~ s/\n"; print "
MessagesBytes\u$text
MessagesBytesAverage\u$text
%d%s%s
%d%s%s%s
\n"; print "\n"; - print "\n"; + print "\n"; } else { printf("%s\n%s\n\n", $temp, "-" x length($temp)); @@ -1099,7 +1113,13 @@ foreach $key (top_n_sort($topcount,$m_data_gigs,$m_data,$m_count)) { $htmlkey = $key; $htmlkey =~ s/>/\>\;/g; $htmlkey =~ s/
MessagesBytes\u$text
MessagesBytesAverage\u$text