Dear Teltonika-team,
while period=day or week show correct amount of sim-data, the period=month shows TOTAL usage:
ubus call mdcollect get ‘{“period”:“month”,“iface”:“mob1s2a1”,“sim”:“2”}’
Any idea?
(I use RUT955 with latest FW, 07.04.3)
Dear Teltonika-team,
while period=day or week show correct amount of sim-data, the period=month shows TOTAL usage:
ubus call mdcollect get ‘{“period”:“month”,“iface”:“mob1s2a1”,“sim”:“2”}’
Any idea?
(I use RUT955 with latest FW, 07.04.3)
HELLO Teltonika team?
In WebUI it’s ok, why usage-period “month” is showing TOTAL usage?
Thx, Rainer
Hello,
Sorry for the delayed response.
Could you post the output of ubus call mdcollect get '{"period":"month","sim":1}'
as well as ubus call mdcollect get '{"sim":1}'
?
The first option should return the values for the month, and the second should return the total consumption.
We have also had a similar thread on the old forum: Best way to retreive mobile data usage - Crowd Support Forum | Teltonika Networks
Best regards,
Period “month” and “total” is the same (despite datetime switches to next month).
In WebUI month and total is different and correct, but not using these commands below.
You could simple reproduce:
root@router:~# date
Wed Jul 19 17:43:53 +200 2023
root@router:~# ubus call mdcollect get ‘{“period”:“month”,“sim”:2}’; ubus call mdcollect get ‘{“sim”:2}’
{
“tx”: 13175236,
“rx”: 13186366
}
{
“tx”: 13175236,
“rx”: 13186366
}
root@router:~# date -u 2023.08.01-00:30
Tue Aug 1 00:30:00 UTC 2023
root@router:~# ubus call mdcollect get ‘{“period”:“month”,“sim”:2}’; ubus call mdcollect get ‘{“sim”:2}’
{
“tx”: 13180612,
“rx”: 13191742
}
{
“tx”: 13180612,
“rx”: 13191742
}
btw: just using “sim”:“2” does not match the real figures in WebUI - but “iface”:“mob1s2a1”,“sim”:“2” shows the figures I could see in WebUI
Anyhow, if month switches to next months the WebUI shows correct figures for the new month, but the below mdcollect-command just ignores the month-switch:
root@router:~# date
Sun Jul 23 23:30:04 +200 2023
root@router:~# ubus call mdcollect get ‘{“period”:“month”,“iface”:“mob1s2a1”,“sim”:“2”}’ | xargs echo
{ tx: 17554018, rx: 84495400 }
root@router:~# date -u 2023.08.01-00:30
Tue Aug 1 00:30:00 UTC 2023
root@router:~# ubus call mdcollect get ‘{“period”:“month”,“iface”:“mob1s2a1”,“sim”:“2”}’ | xargs echo
{ tx: 17554270, rx: 84495652 }
You could simply reproduce.
Thx for your help