0

I am trying to create a graph to show data transmission rate for a router. Mainly I need to show user activity and interface activity.

When I query the API, for example it returns rx-byte = 23412389850 tx-byte = 1308381687. And these numbers are increasing all time. I believe this is total data transmitted since router's up time.

How can I measure the data transmit rate per second, or per 5 second?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
user1322977
  • 141
  • 2
  • 9

1 Answers1

0

You are talking about Interface Statics. This counters, obviously are counters and only are reset to 0 by user action or rebooting router.

If your user is using in absolute this interface you have various options: (ordered easy to hard)

  1. Using integrated interface graph from RouterOS: winbox > tools > graphing > interface rules. Enable interfaces and set allowed ip address to acces
  2. Using external SNMP iface querys, with MRTG or CACTI ( best recommended)
  3. Netflow analistic tool as NFSEN or PMACCT ( advanced user)
  4. Coding your back-end with api and make timers calculations from counters

Personally I recommend to you use CACTI, is the best powerfull tool to manage graph systems ( iface statics, latency, uptimes, system values... )

gilito
  • 354
  • 3
  • 11
  • Hi Gilito,Thanks for your answer, but I do not want to use other tools, I want to know having the Rx and Tx values, can I calculate the transmission rate? – user1322977 Mar 18 '15 at 21:53
  • Yes. rx and tx are counters. Every "x" seconds you must took a sample. Rest 2 lasts samples whose have "x" seconds behind them. Divide de result by "x" seconds and you will have byte/s – gilito Mar 19 '15 at 12:42