[mrtg] Re: Formula for calculating Network Utilisation

Meng Keng Lee mengkenglee at yahoo.com
Fri Jun 25 08:20:41 MEST 2004


Hello,
 
Perhaps I could explain better if I show you my MRTG conf:
 
#######################################################################################
### Interface 1 >> Descr: '' | Name: 'Fa4/0/0' | Ip: '192.168.130.250' | Eth: '00-03-e4-27-b8-80' ###

Target[A2RT01.Fa4_0_0.load]: #Fa4/0/0:test at 192.168.130.250: 

SetEnv[A2RT01.Fa4_0_0.load]: MRTG_INT_IP="192.168.130.250" MRTG_INT_DESCR=""

Directory[A2RT01.Fa4_0_0.load]: A2RT01

YLegend[A2RT01.Fa4_0_0.load]: Link Utilization

#kilo[A2RT01.Fa4_0_0.load]: 1024

#ShortLegend[A2RT01.Fa4_0_0.load]: bps

Legend1[A2RT01.Fa4_0_0.load]: Utilizaiton (In)

Legend2[A2RT01.Fa4_0_0.load]: Utilization (Out)

Legend3[A2RT01.Fa4_0_0.load]: 

Legend4[A2RT01.Fa4_0_0.load]: 

LegendI[A2RT01.Fa4_0_0.load]:  In Utilization: 

LegendO[A2RT01.Fa4_0_0.load]:  Out Utilization: 

#Unscaled[A2RT01.Fa4_0_0.load]: ywmd

MaxBytes[A2RT01.Fa4_0_0.load]: 12500000

Options[A2RT01.Fa4_0_0.load]: growright,bits,nopercent

ThreshMaxI[A2RT01.Fa4_0_0.load]:70%

ThreshProgI[A2RT01.Fa4_0_0.load]:e:\mrtg\bin\thresholdalert.pl

ThreshProgOKI[A2RT01.Fa4_0_0.load]:e:\mrtg\bin\thresholdalert.pl

ThreshMaxO[A2RT01.Fa4_0_0.load]:70%

ThreshProgO[A2RT01.Fa4_0_0.load]:e:\mrtg\bin\thresholdalert.pl

ThreshProgOKO[A2RT01.Fa4_0_0.load]:e:\mrtg\bin\thresholdalert.pl

Title[A2RT01.Fa4_0_0.load]: A2RT01 #Fa4/0/0 Link Utilization

PageTop[A2RT01.Fa4_0_0.load]: <H1>A2RT01 #Fa4/0/0 Link Utilization</H1>

<TABLE>

<TR><TD>System:</TD> <TD>A2RT01 in </TD></TR>

<TR><TD>Maintainer:</TD> <TD></TD></TR>

<TR><TD>Description:</TD><TD> </TD></TR>

<TR><TD>ifType:</TD> <TD>ethernetCsmacd (6)</TD></TR>

<TR><TD>ifName:</TD> <TD>Fa4/0/0</TD></TR>

<TR><TD>Max Speed:</TD> <TD>100.000 Mbits/s</TD></TR>

<TR><TD>Ip:</TD> <TD>192.168.130.250 ()</TD></TR>

</TABLE>
##########################################################################
 
>From the config above, I notice that the MaxBytes is 12500000 but using Getif ifSpeed is 100000000

Furthermore, threshold utilisation hits above 70%, my perl scripts shows the current utilisation value above 100% e.g 1256.74434, 2546.3434324, etc.  However if I divide this value by 300secs (default MRTG interval), it will reflect the correct percentage.
 
Just read from some Cisco docs last night, it says that the correct way of measure bandwidth is (ifInOctets X 8 X100) / (Number of seconds X ifSpeed).
 
So I am quite confused with the way MRTG measures network utilisation in percentage.
 
Regards
 

PAUL WILLIAMSON <pwilliamson at mandtbank.com> wrote:
Why do you say it is wrong? This is exactly how it should be
calculated.
The ThreshMaxI and ThreshMaxO are computed based on the interval. 

What is wrong about it? If MRTG polls in 5 minute intervals, the only 
threshold it knows about is the 5 minute window. If you want it to 
compute the thresholds on a lower interval (like 1 minute), you need 
to poll that often and set the threshold accordingly. How is MRTG
supposed 
to alert you of a threshold that has been crossed at any one point
during 
the interval? This is what you are asking for. MRTG is not a packet 
sniffing real-time application. If you want to be alerted at any one
point 
(down to a second) during a burst of traffic, you need to deploy RMON 
probes out to your network that can listen to traffic real-time (a few 
that come to mind are ntop, nGenuis, NetVigil and Nebula). MRTG is 
not the tool to accomplish this. ntop uses RRDTool however...

Paul

>>> "Meng Keng Lee" 06/24/04 1:02 AM >>>
Hello Alex,
then how do we deploy this formula to MRTG to monitor network threshold?


I did some testing and found that I did to divide by 300sec to derive a
correct network utilisation percentage to be monitored for threshold
alert.

Furthermore, in MRTG, ThresMaxi derives its percentage from MaxBytes
which is wrong then.

Regards
Alex van den Bogaerdt wrote:
On Tue, Jun 22, 2004 at 08:38:34PM -0700, Meng Keng Lee wrote:
> Hello,
> 
> Can I check with you whether the formula for calculating Network
Utilisation (Input/Ouput) is correct?
> 
> Network Utilisation (Input in %) = ifInOctets/ifSpeed * 800
> 
> Network Utilisation (Output in %) = ifOutOctets/ifSpeed * 800

___if___ the ifInOctets counter counts bytes and ifSpeed is in bits
then it is correct. This is __not__ the case.

Both counters are of the same type (both bits or both bytes) and thus
a percentage is 100 * x/y.

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://www.ee.ethz.ch/~slist/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi



---------------------------------
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://www.ee.ethz.ch/~slist/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi




--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://www.ee.ethz.ch/~slist/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi

Homepage http://www.mrtg.org
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi


		
---------------------------------
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list