Oops, the last script below should actually be: grep rdeliver m:\imail\spool\sys0203.txt | gawk -f IMail-SMTP-RD.txt
"rdeliver" instead of "ldeliver". Bill ----- Original Message ----- From: "Bill Landry" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 04, 2004 9:33 PM Subject: Re: [Declude.JunkMail] Slightly OT: calculating bandwidth > ----- Original Message ----- > From: "Omar K." <[EMAIL PROTECTED]> > > > Im trying to figure out how much bandwidth my imail > > server sends/receives, I know its best to do this on the > > router level, but I don't have access to these. Is this > > information stored in any log file ? > > I know I am starting to sound like a broken record about this, and I not > sure why people are afraid to try them, but the UNIX utilities for Win32 are > available for free download at http://unxutils.sourceforge.net/. With these > tools you could easily do this by parsing your IMail log files. > > Here are three examples: > > Incoming (SMTPD) minimum, average, maximum, and total bytes/kb/mb: > > (save the follow to a file called IMail-SMTPD.txt) > ----- > NR == 1 {a=$(NF-0) ; b=$(NF-0)} > $(NF-0) <= a {a = $(NF-0)} > $(NF-0) >= b {b = $(NF-0)} > {c += $(NF-0) ; d = c/NR} > END {print "SMTPD: Min = " a"b", " Avg = " d/1024"kb", " Max = " > b/1048576"mb", " Tot = " c/1048576"mb"} > ----- > Then execute this script: > egrep "SMTPD.*\.SMD" m:\imail\spool\sys0203.txt | gawk -f IMail-SMTPD.txt > > Which will produce output like: > SMTPD: Min = 263b Avg = 50.8899kb Max = 11.7192mb Tot = 356.627mb > > ===== > > Outgoing (SMTP) minimum, average, maximum, and total "local" delivery: > (save the follow to a file called IMail-SMTP-LD.txt) > ----- > NR == 1 {e=$(NF-0) ; f=$(NF-0)} > $(NF-0) <= e {e = $(NF-0)} > $(NF-0) >= f {f = $(NF-0)} > {g += $(NF-0) ; h = g/NR} > END {print "SMTP-LD: Min = " e"b", " Avg = " h/1024"kb", " Max = " > f/1048576"mb", " Tot = " g/1048576"mb"} > ----- > Then execute this script: > grep ldeliver m:\imail\spool\sys0203.txt | gawk -f IMail-SMTP-LD.txt > > Which will produce output like: > SMTP-LD: Min = 734b Avg = 50.5353kb Max = 8.5895mb Tot = 266.692mb > > ===== > > Outgoing (SMTP) minimum, average, maximum, and total "remote" delivery: > (save the follow to a file called IMail-SMTP-RD.txt) > ----- > NR == 1 {i=$(NF-0) ; j=$(NF-0)} > $(NF-0) <= i {i = $(NF-0)} > $(NF-0) >= j {j = $(NF-0)} > {k += $(NF-0) ; l = k/NR} > END {print "SMTP-RD: Min = " i"b", " Avg = " l/1024"kb", " Max = " > j/1048576"mb", " Tot = " k/1048576"mb"} > ----- > Then execute this script: > grep ldeliver m:\imail\spool\sys0203.txt | gawk -f IMail-SMTP-RD.txt > > Which will produce output like: > SMTP-RD: Min = 482b Avg = 49.6214kb Max = 11.7196mb Tot = 134.908mb > > Watch for word-wrapping on the last line of each script (each script should > only be five lines long). Good luck, > > Bill > > --- > [This E-mail was scanned for viruses by Declude Virus (http://www.declude.com)] > > --- > This E-mail came from the Declude.JunkMail mailing list. To > unsubscribe, just send an E-mail to [EMAIL PROTECTED], and > type "unsubscribe Declude.JunkMail". The archives can be found > at http://www.mail-archive.com. > --- [This E-mail was scanned for viruses by Declude Virus (http://www.declude.com)] --- This E-mail came from the Declude.JunkMail mailing list. To unsubscribe, just send an E-mail to [EMAIL PROTECTED], and type "unsubscribe Declude.JunkMail". The archives can be found at http://www.mail-archive.com.