how can i limit users according to amount of download ?
i have 15 users some of them download alot and i want to limit them after they reach 6 gig per day
my ip for users 10.0.0.1 can anyone please help and explain steps because i am new at this
Please lower the amount (for example to 10 Mb) and run yourself on that interface. The switch on the logging and run a download (or start any Youtube movie).
If there is errors in the script, the terminal could be giving you an error message when you try to run it there.
So what is it saying?
EDIT:
Yeah there were some syntax errors in the script you posted. Some property names also seemed to be wrong/nonexistent, at least on RouterOS v6.35.
Try this:
Other than that I know nothing about queues, so I can’t say for sure this will work in your setup.
But in my little test it seemed to work fine. A problem I found was that “target” is a semi-colon separated list if there is more than one address listed, so checking it as a string is very weird. Would it not be easier to just loop through all queues that have a specific name prefix or comment?
i really thank u for looking in to my problem however i tried the script in terminal and it says ( invalid internal item number
) although there r many users now have reached 5 gig
“invalid internal item number”? I have never seen that error before.
Are there multiple queues with the same IP address set as their “target”?
Looking at the picture it seem so. The “client1” queue has the same IP address as “” queue.
Like I said, would it not be easier to loop through the queues? Can we relay on the queues always being named “<hotspot-???>”?
If we can then it is simple to change the script to:
This works by simply looping through all the queues that start with “<hotspot-”. You can change the affected queues by altering the [find] command’s parameters at line 2.
yes there r multi ip same number i did that to make total-bytes work for the same users -i will remove it now and test- but may be as u said loop is easier
the thing is my queue i can’t modfy it so total-bytes wont work i think that because i didn;t put it manual it come from hotspot << sorry for my bad English
You replied before I was done editing my post, read it again.
Ok, so the “total-bytes” property is always 0 for a dynamic queue? Seems like a bug.
The “bytes” property is up and down separated by a slash (/), could just add those together I guess.
EDIT:
Wait “failure: cannot change dynamic”, so we can’t change the “max-limit” property of a dynamic queue?
Ok that I have no clue about then, try looking in the hotspot manual for that.
As said in that thread, you have to control the Hotspot Users rather than the queues.
The queues are dynamically created and changed when the user is changed.
I just don’t know anything about the Hotspot feature, so I don’t know what values need to be changed.
But looking a little bit at it, it looks like you can set a “User” to use a “User Profile” and the user profile can have a rate-limit. So it should be easy to loop through the users and change their user profile to a user profile that has a rate-limit.