FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
133 views 4 comments
by anonymous
Dear Teltonika Team,

how I could get total bytes the interfaces mob1s1a1 & mob1s2a1 have sent?

Thx, Rainer

1 Answer

0 votes
by anonymous

Hello,

  

One way to gather the data via the CLI/SSH could be by running the ifconfig command. It will list all of the interfaces and the RX, as well as TX bytes. The mobile interface on the RUT955 is wwan0:

wwan0     Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:xxx.xxx.xxx.xxx  P-t-P:xxx.xxx.xxx.xxx  Mask:255.255.255.255
          inet6 addr: fe80::e46a:4cc4:ff7b:7be5/64 Scope:Link
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:226003 errors:0 dropped:0 overruns:0 frame:0
          TX packets:185444 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:161010501 (153.5 MiB)  TX bytes:45254795 (43.1 MiB)

An alternative could be to get this data using the gsmctl command. This command will only return the byte count, so this could be easier to parse in the scripts:

gsmctl -e wwan0 #retuns bytes sent from the mobile interface

gsmctl -r wwan0 #retuns bytes received on the mobile interface

Finally, if you'd simply like to check this information via the WebUI, you can navigate to Status → Network → Mobile, and in the Data Transmission section there are fields for "Bytes received" and "Bytes sent".

Hope this helps!

  

Best regards,
DaumantasG

Best answer
by anonymous
Yes, thx, that is what I found already in this forum - anyhow great thx.

But how I could get the total usage for mob1sXa1 interfaces (this was the question ;.-)) ?

An alternative would be, that I could get the total usage from a sim1 or sim2 as I see in WebUI.
I'm asking since there is no "total" allowed in this command:
ubus call mdcollect get '{"iface_name":"wwan0","conn_period":"total","sim":"1"}'

Thx, Rainer
by anonymous

Hello,

  

In theory, the period argument is not needed at all, and it should be enough to use the call:

ubus call mdcollect get '{"sim":1}'

  

Best regards,
DaumantasG

by anonymous
Great thx !! That's it. :-)
by anonymous
Great to hear that!