Page 1 of 1

Script to duplicate speeds in queue list

Posted: Fri Jun 14, 2019 9:40 pm
by eldoncito2019
Regards,
I want to double the bandwidth of my users with the following script, but it does not work, someone to guide me. Thank you.

This is the acript:

:foreach i in=[/queue simple find] do={
:if ([:find [/queue simple get $i max-limit] "256000/2048000"] = 0) do={
/queue simple set $i max-limit= "512000/3076000";
}
}

Re: Script to duplicate speeds in queue list

Posted: Fri Jun 14, 2019 10:41 pm
by Jotne
You are using the if wrong.

Try this:
:foreach i in=[/queue simple find] do={
:if ([/queue simple get $i max-limit] ="256000/2048000"] ) do={
/queue simple set $i max-limit= "512000/3076000";
}
}
This will teste every queue if the max-limit are "256000/2048000", and if so, do:

Re: Script to duplicate speeds in queue list

Posted: Fri Jun 14, 2019 11:03 pm
by eldoncito2019
my friend, what I want the script to do is double the bandwidth from 10:00 p.m. to 06:00 a.m. every day.

Re: Script to duplicate speeds in queue list

Posted: Fri Jun 14, 2019 11:30 pm
by Jotne
For all queues?
Do all queues have same max-limit?

Re: Script to duplicate speeds in queue list

Posted: Fri Jun 14, 2019 11:42 pm
by eldoncito2019
yes friend, for all the queues and all the queues are the same.

Re: Script to duplicate speeds in queue list

Posted: Sat Jun 15, 2019 12:44 am
by Jotne
Then you need two script

One run at 10:00 p.m. and another at 06:00 a.m.
:foreach i in=[/queue simple find] do={
/queue simple set $i max-limit= "512000/3076000";
}
:foreach i in=[/queue simple find] do={
/queue simple set $i max-limit= "256000/3076000";
}

Re: Script to duplicate speeds in queue list

Posted: Sat Jun 15, 2019 1:05 am
by eldoncito2019
That is a friend. Thank you.

Re: Script to duplicate speeds in queue list

Posted: Sat Jun 15, 2019 1:05 am
by eldoncito2019
That is a friend. Thank you.