Community discussions

MikroTik App
 
fabricioviana
just joined
Topic Author
Posts: 16
Joined: Fri May 25, 2007 6:37 am
Contact:

TX RX Rate: SNMP or API?

Thu Sep 22, 2011 7:51 pm

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
 
vemax78
just joined
Posts: 11
Joined: Thu Sep 22, 2011 5:53 pm

Re: TX RX Rate: SNMP or API?

Thu Sep 22, 2011 8:27 pm

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
 
fabricioviana
just joined
Topic Author
Posts: 16
Joined: Fri May 25, 2007 6:37 am
Contact:

Re: TX RX Rate: SNMP or API?

Fri Sep 23, 2011 11:09 pm

Massimo! Thanks for your help! I will try!


C ya
Fabricio

Who is online

Users browsing this forum: No registered users and 28 guests