Community discussions

MikroTik App
 
fabiosql
just joined
Topic Author
Posts: 2
Joined: Fri Feb 12, 2021 10:05 pm

How to get TX / RX bytes through mikrotik's api php?

Fri Feb 12, 2021 11:05 pm

Image
How to get TX / RX bytes through mikrotik's api php?
I'm not getting it in version V6.47.3
 
fabiosql
just joined
Topic Author
Posts: 2
Joined: Fri Feb 12, 2021 10:05 pm

Re: How to get TX / RX bytes through mikrotik's api php?

Wed Feb 17, 2021 7:22 pm

Return "byte" data in the format "RX, TX" (ie "545124,25422"). So you need to do a little trick to pull the RX string: look for the "," character and pull the string before that comma. : local posComma [: find $ bytes "," -1] : local RXbytes [: pick $ bytes 0 $ posComma]
Sorry, my problem is when I get the pppoe interface, the api does not return the "name", as in the image below.
I use the api through PHP.
Follow the image of "name" handing me empty: https://imgur.com/a/qfM0yjc

Who is online

Users browsing this forum: No registered users and 21 guests