[mrtg-developers] Method of retrieving Bits per sec (MRTG ref)

S Shipway s.shipway at auckland.ac.nz
Mon Mar 29 23:38:41 CEST 2010

A normal MRTG graph will have two variables (normally shown as one blue line and one green area) - one for Incoming and one for Outgoing.

Bits/sec is 8 * [(ifInOctetsVal2 - ifInOctetsVal1)/(T2-T1)], however RRDTool also does 'data time window normalisation' which is a bit too complex to fully describe here and uses averages to make T1 and T2 set to the 5-min time window boundary.


From: Prakash Mariasusai [via MRTG Mailinglists] [mailto:ml-node+4817524-446686016-68162 at n2.nabble.com]
Sent: Tuesday, 30 March 2010 1:02 a.m.
To: Steve Shipway
Subject: Re: Method of retrieving Bits per sec (MRTG ref)

Hi Steve,

Thanks for your response. We tried using the below mentioned procedure.

We are getting 2 values for bits per sec,
one for Incoming packets, and the other on outgoing packets.

Is the one displayed in MRTG the sum of these 2 values?
In other words, is bytes per sec displayed in MRTG = 8 * [(ifInOctetsVal2 - ifInOctetsVal1)/(T2-T1) + (ifOutOctetsVal2 - ifOutOctetsVal1)/(T2-T1)] ?

Pls. let us know.

Re: [mrtg-developers] Method of retrieving Bits per sec (MRTG ref)
S Shipway
Wed, 17 Mar 2010 13:54:09 -0700
MRTG obtains this data by reading the ifInOctets and ifOutOctets values in the
IF-MIB via SNMP at 5min intervals, calculating the difference (taking into
account possible counter wrap)  and dividing by the time interval, then
multiplying by 8 to get bits/sec.  This is in the standard MIB.  If the
interface is a high-speed interface (>=100Mbps) and the device supports it,
then the MIB-2 isused instead and the h64bit counters ifHCInOctets and
ifHCOutOctets are used instead (to prevent counter wrap from causing problems).


From: Prakash Mariasusai [via MRTG Mailinglists]
[[hidden email]<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4817524&i=0>]
Sent: Thursday, 18 March 2010 3:13 a.m.
To: Steve Shipway
Subject: Method of retrieving Bits per sec (MRTG ref)
I am writing a small program to get the "Bits per sec" value
for a network interface in Unix systems (Solaris, Linux severs)
similar to the one provided by MRTG in the below link:
I assume that MRTG does the same through SNMP.
I am new to SNMP and if someone can point me to the appropriate MIB/OID,
for doing the same, it would be very helpful.
Thanks in advance,

View this message in context:



The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.

It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in

this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.

Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of

this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have

received this email in error please delete it and notify the sender immediately. Before opening any mail and

attachments please check them for viruses and defect.


mrtg-developers mailing list
[hidden email]<http://n2.nabble.com/user/SendEmail.jtp?type=node&node=4817524&i=1>

View message @ http://n2.nabble.com/Re-Method-of-retrieving-Bits-per-sec-MRTG-ref-tp4817524p4817524.html
To start a new topic under MRTG Developers Mailinglist, email ml-node+795384-1747653317-68162 at n2.nabble.com
To unsubscribe from MRTG Developers Mailinglist, click here< (link removed) =>.

View this message in context: http://n2.nabble.com/Re-Method-of-retrieving-Bits-per-sec-MRTG-ref-tp4817524p4820970.html
Sent from the MRTG Developers Mailinglist mailing list archive at Nabble.com.

More information about the mrtg-developers mailing list