Page 1 of 1

TX RX Rate: SNMP or API?

Posted: Thu Sep 22, 2011 7:51 pm
by fabricioviana
Hello!

After searching for a solution without success, I would love help from someone in the Mikrotik community.

I could not find the OID to capture TX and RX Rate for a given interface (ether1, ether2, etc.).

I found how to capture the octets, bytes-in, bytes-out, etc. .. But really have not found how to capture the TX and RX interface rates.

I found that there is an OID called IF-MIB:: ifSpeed​​, but the results are static:

IF-MIB:: ifSpeed.1 = Gauge32: 100000000
IF-MIB:: ifSpeed.2 = Gauge32: 10000000
IF-MIB:: ifSpeed.3 = Gauge32: 10000000
IF-MIB:: ifSpeed.4 = Gauge32: 11000000
IF-MIB:: ifSpeed.5 = Gauge32: 11000000
IF-MIB:: ifSpeed.6 = Gauge32: 100000000
IF-MIB:: ifSpeed.7 = Gauge32: 10000000

Is there any a not static OID to capture traffic (TX / RX)?

I found on the Mikrotik Wiki how to get this information via API (http://wiki.mikrotik.com/wiki/Munin_Monitoring), but I'd like to get it via SNMP.

How The Dude, Cacti, MRTG and other programs capture this information?

Thank you!
Fabricio

Re: TX RX Rate: SNMP or API?

Posted: Thu Sep 22, 2011 8:27 pm
by vemax78
You can calculate the throughput of an interface using this technique:

take a sample of the total bytes-in, wait 60 seconds and take another sample bytes-in total.

TotalByteIn [t = 0s] is total bytes-in after 0 seconds
TotalByteIn [t = 60s] is total bytes-in after 60 second

The average throughput in this time interval is calculated using this formula (the value is Bps)

(TotalByteIn [t = 60s] - TotalByteIn [t = 0s]) / 60 = Throughput


Bye
Massimo

Re: TX RX Rate: SNMP or API?

Posted: Fri Sep 23, 2011 11:09 pm
by fabricioviana
Massimo! Thanks for your help! I will try!


C ya
Fabricio