Re: [Declude.JunkMail] Slightly OT: calculating bandwidth

2004-02-05 Thread Bill Landry
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 =  ab,   Avg =  d/1024kb,   Max = 
 b/1048576mb,   Tot =  c/1048576mb}
 -
 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 =  eb,   Avg =  h/1024kb,   Max = 
 f/1048576mb,   Tot =  g/1048576mb}
 -
 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 =  ib,   Avg =  l/1024kb,   Max = 
 j/1048576mb,   Tot =  k/1048576mb}
 -
 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.


RE: [Declude.JunkMail] Slightly OT: calculating bandwidth

2004-02-05 Thread Omar K.
Thank you so much Bill, this is what I was looking for.  Ill give it a shot
and let you know.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bill Landry
Sent: Thursday, February 05, 2004 9:32 AM
To: [EMAIL PROTECTED]
Subject: Re: [Declude.JunkMail] Slightly OT: calculating bandwidth


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 =  ab,   Avg =  d/1024kb,   Max = 
 b/1048576mb,   Tot =  c/1048576mb}
 -
 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 =  eb,   Avg =  h/1024kb,   Max = 
 f/1048576mb,   Tot =  g/1048576mb}
 -
 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 =  ib,   Avg =  l/1024kb,   Max = 
 j/1048576mb,   Tot =  k/1048576mb}
 -
 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.

---
[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.


RE: [Declude.JunkMail] Slightly OT: calculating bandwidth

2004-02-05 Thread Markus Gufler

 ... 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

Ok, great script, but one question:
As I can understand this script will read values from the logfile that
indicate message sizes. So the min and max values are not minimum and
maximum bits per second (for which time range? 5 minutes?) but are the
smallest and largest processed messages in this logfile. This has nothing to
do with maximum bandwith usage!

The average value can also be calculated with delog: Read the total incoming
or outgoing bytes at the end of the report and divide them by the factor
10800
This will transform the units from Bytes/day in Bits/second (the common used
unit for this type of data)

So a total incoming trafic of 1 GB/day will create an average bandwith usage
of 92592 Bits/second (~ 92 kBit/s) for the entire day. (note: this is only
the incoming value)

Based on the data in the SMTP logfile it's not possible to calculate the
real peak value or real traffic usage diagrams because even if you calculate
every single message from his begin of transfer to the end this will be only
an average value for this single message (the transfer rate can go up and
down durring the transfer of a singel message).

You can try to watch windows perfmon values or enable SNMP on this windows
server. Alternatively you can put a SNMP enabled device like HPs Procurve
switches between your server and the router and then read out values from
there.


Markus



---
[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.


Re: [Declude.JunkMail] Slightly OT: calculating bandwidth

2004-02-05 Thread Bill Landry
- Original Message - 
From: Markus Gufler [EMAIL PROTECTED]

  ... 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

 Ok, great script, but one question:
 As I can understand this script will read values from the logfile that
 indicate message sizes. So the min and max values are not minimum and
 maximum bits per second (for which time range? 5 minutes?) but are the
 smallest and largest processed messages in this logfile. This has nothing
to
 do with maximum bandwith usage!

Correct, however, from Omar's original post, it seemed like what he was
really looking for was actually the amount of data flowing into and out of
his server.  If he really wanted IMail based bandwidth utilization, then
using RRDtool is the way to go.

 The average value can also be calculated with delog: Read the total
incoming
 or outgoing bytes at the end of the report and divide them by the factor
 10800
 This will transform the units from Bytes/day in Bits/second (the common
used
 unit for this type of data)

Sure, if you want to wait for some number of hours for Delog to parse your
log file and then manually do the calculations, fine.  However, if you want
the results in seconds, then use the scripts I provided.

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.


Re: [Declude.JunkMail] Slightly OT: calculating bandwidth

2004-02-04 Thread Doug Anderson
Do you have read access to the router's snmp community? if you doMRTG
gives some great stats

- Original Message - 
From: Omar K. [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, February 04, 2004 9:26 PM
Subject: [Declude.JunkMail] Slightly OT: calculating bandwidth


Hello list,

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 ?


Thanks,


---
[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.