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

Prakash Mariasusai prakashm at hcl.in
Mon Mar 29 14:00:25 CEST 2010


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.

Thanks,
Prakash

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

Steve

From: Prakash Mariasusai [via MRTG Mailinglists]
[mailto:ml-node+4750489-553955619-68... at n2.nabble.com]
Sent: Thursday, 18 March 2010 3:13 a.m.
To: Steve Shipway
Subject: Method of retrieving Bits per sec (MRTG ref)
Hi,
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:
http://www.switch.ch/network/operation/statistics/geant2.html
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,
Prakash

--
View this message in context:
http://n2.nabble.com/Method-of-retrieving-Bits-per-sec-MRTG-ref-tp4750489p4752968<http://n2.nabble.com/Method-of-retrieving-Bits-per-sec-MRTG-ref-tp4750489p4752968.html>



DISCLAIMER:
-----------------------------------------------------------------------------------------------------------------------

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.

-----------------------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/mrtg-developers/attachments/20100329/e28226cf/attachment-0001.htm 


More information about the mrtg-developers mailing list