TX-BYTE and RX-BYTE

If I issue
[admin@Mikrotik] > /interface print stats
it will return
Flags: D - dynamic, X - disabled, R - running, S - slave

NA RX-BYTE TX-BYTE RX-PACKET TX-PACKET RX-DROP TX-DROP

0 R et 23 366 865 152 283 106 193 502 182 514 0 0
1 wl 22 220 63 608 189 141 0 0
2 wl 199 155 2 279 514 1 883 2 168 0 0


How do I capture or “get” RX-BYTE and TX-BYTE and store in global variables?

You can do something like this. I’m assuming your interfaces are ether1, wlan1, and wlan2.
:global e1tx [/interface get ether1 tx-byte]
:global e1rx [/interface get ether1 rx-byte]

:global w1tx [/interface get wlan1 tx-byte]
:global w1rx [/interface get wlan1 rx-byte]

:global w2tx [/interface get wlan2 tx-byte]
:global w2rx [/interface get wlan2 rx-byte]

Thanks skot! I didn’t expect it would be that simple. :slight_smile: