Community discussions

 
eldoncito2019
newbie
Topic Author
Posts: 35
Joined: Fri Jun 14, 2019 1:07 pm

Script to duplicate speeds in queue list

Fri Jun 14, 2019 9:40 pm

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";
}
}
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 1127
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Script to duplicate speeds in queue list

Fri Jun 14, 2019 10:41 pm

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:
 
How to use Splunk to monitor your MikroTik Router

MikroTik->Splunk
 
 
eldoncito2019
newbie
Topic Author
Posts: 35
Joined: Fri Jun 14, 2019 1:07 pm

Re: Script to duplicate speeds in queue list

Fri Jun 14, 2019 11:03 pm

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.
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 1127
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Script to duplicate speeds in queue list

Fri Jun 14, 2019 11:30 pm

For all queues?
Do all queues have same max-limit?
 
How to use Splunk to monitor your MikroTik Router

MikroTik->Splunk
 
 
eldoncito2019
newbie
Topic Author
Posts: 35
Joined: Fri Jun 14, 2019 1:07 pm

Re: Script to duplicate speeds in queue list

Fri Jun 14, 2019 11:42 pm

yes friend, for all the queues and all the queues are the same.
 
User avatar
Jotne
Forum Guru
Forum Guru
Posts: 1127
Joined: Sat Dec 24, 2016 11:17 am
Location: Magrathean

Re: Script to duplicate speeds in queue list

Sat Jun 15, 2019 12:44 am

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";
}
 
How to use Splunk to monitor your MikroTik Router

MikroTik->Splunk
 
 
eldoncito2019
newbie
Topic Author
Posts: 35
Joined: Fri Jun 14, 2019 1:07 pm

Re: Script to duplicate speeds in queue list

Sat Jun 15, 2019 1:05 am

That is a friend. Thank you.
 
eldoncito2019
newbie
Topic Author
Posts: 35
Joined: Fri Jun 14, 2019 1:07 pm

Re: Script to duplicate speeds in queue list

Sat Jun 15, 2019 1:05 am

That is a friend. Thank you.

Who is online

Users browsing this forum: No registered users and 12 guests