I have router with SIM card. My ISP give me unlimited traffic but after 10GB it droped me download speed to 3Mbs…Than I must send SMS to some number to bring me back normal speed.
First I try to use script in Tools → Traffic monitor to monitor if download speed is under 4 Mbs and if it is RouterOS will automaticlly send SMS. But than I realize that that is wrong, cos when I not use internet router will non stop sending message !
I realize that I must track change in download speed, but how to do that ?
Put “SMS” into the Search box top right and see what you can find!
I guess OP’s problem is not sending SMS, it’s to detect when throughput is low due to ISP’s limitations rather than due to inactivity.
I’ve no idea how to do that … other than to run some speed test and check the results (both speedtest results and interface throughput during the test).
Is there a way to detect 10GB usage of throughput??
Is there a way to detect 10GB usage of throughput??
No, but OP wrote
… it droped me download speed to 3Mbs.
and that is possible to detect (when contrasting it to say 100Mbps).
Catch-22
Testing for speed is consuming bandwidth too…
How else can you know bandwidth has dropped if not specifically testing for it ?
My ISP give me unlimited traffic but after 10GB it droped me download speed to 3Mbs
…
How else can you know bandwidth has dropped if not specifically testing for it ?
Checking for the total traffic of the interface to reach 10GB? It is available in interface stats and can also be read by scripts.
And it can also be reset to be rearmed for the next 10GB chunk.
I suggest check the inbox of new SMS.
Maybe your SMS give you a SMS like “Your limit is over” and you can easy detect that and send e-mail and SMS to proper person… and this will be better then try count a DL+UL data.
No, I havent got incoming SMS…Every month I have got 60GB and after spending that I have got 10GB, 10 GB…
But I think that problem will be solve if I will have in Tools- Traffic Monitor…on Trigger condition “beetwen”…Than I will put 3-5Mps, and I think that taht will solve problem…
Can I wrote 2 scripts (in Traffic monitor undar Event)…and in first I put, if traffic is under 5Mps, some global variable to True.
In second condition, (where is trigger above 3Mps) I first check that variable, and if it is true I send SMS…if it is not True I reset first global variable…
Traffic Monitor check value per SECOND and it’s not good for your issue.
You can use some script to count GB of traffic DL/UL at lte1 but this is always a problem if a power-loose exist who breake your script and you loose a lastest session data :(.
Script who will cumulative a DL+UL to value should be run every 5m and add the 5m changes. This way it’s can be done as some soluton.
Second is a way to detect the max speed is more then 4Mb, this seams better way here.
Idea, TrafficMonitor can be used here as a trigger, if DL>5Mbps then update value “SpeedInternetLastTime=$Date+Time”
Second script can be run every 1h and check if by last 1h we receive more then 5Mb of DL.
Next script who do a SpeedTest at DL direction every 50m at 5sec to try generate speed - thanks to that when you not generate traffic becasuse e.g. you sleep then this AutoSpeedTest update value.
Thise are 2 ideas what can be used, I not have anythink out-of-box now.
What you can do.
Setup a filter rule that allows all traffic inn (forward) at the top of the firewall list
At each start of period (1st each month) clear counter.
This rule will show total bytes and number of packets.
If >60GB send SMS
If >60GB+x*10GB sends SMS
New periode, reset.
My fw rule “defconf: accept established,related”
:put [/ip firewall filter get *5 bytes ]
1316626217169
This show 1.3TB
:put [/ip firewall filter get [find comment~"byte_counter"] bytes]