Dynamic simple queue "total-bytes"?
Posted: Tue Jun 23, 2009 6:19 am
I have written a script which interrogates the dynamic queues from Usermanager.
When the users download more than 150MB the script should override the speed of the queues released by user-manager:
{
:local traf 0;
/queue simple;
:foreach i in=[find dynamic=yes] do={
:set traf [get $i total-bytes];
:if ($traf > 150000000) do = {
set $i limit-at=64000/64000 max-limit=64000/64000 burst-threshold=0/0 burst-limit=0/0 burst-time=0/0; \
}
}
}
I have noticed that the above script does not work correctly because "total-bytes" only gives me the Target Upload bytes.
Is that because the default queue type of a dynamic queue is the "default-small" queue?
How can I extract the total-bytes not only the Target Upload bytes?
Any help will be appreciated.
When the users download more than 150MB the script should override the speed of the queues released by user-manager:
{
:local traf 0;
/queue simple;
:foreach i in=[find dynamic=yes] do={
:set traf [get $i total-bytes];
:if ($traf > 150000000) do = {
set $i limit-at=64000/64000 max-limit=64000/64000 burst-threshold=0/0 burst-limit=0/0 burst-time=0/0; \
}
}
}
I have noticed that the above script does not work correctly because "total-bytes" only gives me the Target Upload bytes.
Is that because the default queue type of a dynamic queue is the "default-small" queue?
How can I extract the total-bytes not only the Target Upload bytes?
Any help will be appreciated.