⏱ O‘qish vaqti: 3 daqiqa
Qisqacha
- Barcha Simple Queue yozuvlarini topadi.
- Har bir yozuvga tanlangan queue va total‑queue tipini qo‘llaydi.
- Default, default‑small, PCQ yoki maxsus turlarga o‘zgartirish mumkin.
Simple Queue turlarini qo‘lda o‘zgartirish ko‘p vaqt oladi va xatolarga olib kelishi mumkin. Bu skript barcha Simple Queue elementlarini bir zumda kerakli turga o‘zgartiradi. Natijada tarmoqni boshqarish ancha soddalashadi.
Talablar
- RouterOS admin huquqi
- Winbox, WebFig yoki terminalga kirish imkoniyati
- Mavjud Simple Queue konfiguratsiyasini zaxiralash (ixtiyoriy)
Sozlash bosqichlari
1. Simple Queue turlarini default/default ga o‘zgartirish
Skript foreach i in=([/queue simple find]) do={ sikli orqali barcha simple queue obyektlarini topadi. Har bir obyekt uchun queue simple set buyrug‘i chaqiriladi va queue=default/default hamda total-queue=default qiymatlari o‘rnatiladi. Bu barcha foydalanuvchilarga default limitlarni qo‘llashga imkon beradi.
Skriptni RouterOS terminaliga yoki Schedulerga joylashtiring va bajarilishini kuting.
Very simple how to change all Queue type in Simple Queue
Change all Queue type to default
foreach i in=([/queue simple find]) do={
local cmd ("queue simple set " . $i . " queue=default/default total-queue=default")
:execute $cmd
}
Change all Queue type to default-small
foreach i in=([/queue simple find]) do={
local cmd ("queue simple set " . $i . " queue=default-small/default-small total-queue=default-small")
:execute $cmd
}
Change all Queue Type to PCQ
foreach i in=([/queue simple find]) do={
local cmd ("queue simple set " . $i . " queue=pcq-upload-default/pcq-download-default total-queue=default-small")
:execute $cmd
}
Change all Queue Type to hotspot-default
foreach i in=([/queue simple find]) do={
local cmd ("queue simple set " . $i . " queue=hotspot-default/hotspot-default total-queue=hotspot-default")
:execute $cmd
}
Change all Queue Type with custom Queue Type
foreach i in=([/queue simple find]) do={
local cmd ("queue simple set " . $i . " queue=your-custom-queue-type/your-custom-queue-type total-queue=your-custom-queue-type")
:execute $cmd
}
Credit: https://www.o-om.com
2. Simple Queue turlarini PCQ‑upload/PCQ‑download ga o‘zgartirish
Ushbu qism ham xuddi avvalgidek barcha simple queue obyektlarini aylanadi, lekin queue=pcq-upload-default/pcq-download-default hamda total-queue=default-small qiymatlari bilan yangilanadi. PCQ turini tanlash orqali yuklamani yanada adolatli taqsimlash mumkin.
Skriptni kerakli joyda ishga tushiring; natijada har bir queue PCQ‑profiliga mos keladi.
Very simple how to change all Queue type in Simple Queue
Change all Queue type to default
foreach i in=([/queue simple find]) do={
local cmd ("queue simple set " . $i . " queue=default/default total-queue=default")
:execute $cmd
}
Change all Queue type to default-small
foreach i in=([/queue simple find]) do={
local cmd ("queue simple set " . $i . " queue=default-small/default-small total-queue=default-small")
:execute $cmd
}
Change all Queue Type to PCQ
foreach i in=([/queue simple find]) do={
local cmd ("queue simple set " . $i . " queue=pcq-upload-default/pcq-download-default total-queue=default-small")
:execute $cmd
}
Change all Queue Type to hotspot-default
foreach i in=([/queue simple find]) do={
local cmd ("queue simple set " . $i . " queue=hotspot-default/hotspot-default total-queue=hotspot-default")
:execute $cmd
}
Change all Queue Type with custom Queue Type
foreach i in=([/queue simple find]) do={
local cmd ("queue simple set " . $i . " queue=your-custom-queue-type/your-custom-queue-type total-queue=your-custom-queue-type")
:execute $cmd
}
Credit: https://www.o-om.com
3. Maxsus queue turini belgilash (ixtiyoriy)
Agar o‘z maxsus queue profilingiz bo‘lsa, skript ichidagi queue=your-custom-queue-type/your-custom-queue-type va total-queue=your-custom-queue-type qismlarini o‘zingizning nomlaringizga moslab tahrirlang. Keyin skriptni qayta ishga tushiring.
Bu usul orqali maxsus traffic shaping siyosatlarini bir zumda barcha foydalanuvchilarga tatbiq etish mumkin.
Very simple how to change all Queue type in Simple Queue
Change all Queue type to default
foreach i in=([/queue simple find]) do={
local cmd ("queue simple set " . $i . " queue=default/default total-queue=default")
:execute $cmd
}
Change all Queue type to default-small
foreach i in=([/queue simple find]) do={
local cmd ("queue simple set " . $i . " queue=default-small/default-small total-queue=default-small")
:execute $cmd
}
Change all Queue Type to PCQ
foreach i in=([/queue simple find]) do={
local cmd ("queue simple set " . $i . " queue=pcq-upload-default/pcq-download-default total-queue=default-small")
:execute $cmd
}
Change all Queue Type to hotspot-default
foreach i in=([/queue simple find]) do={
local cmd ("queue simple set " . $i . " queue=hotspot-default/hotspot-default total-queue=hotspot-default")
:execute $cmd
}
Change all Queue Type with custom Queue Type
foreach i in=([/queue simple find]) do={
local cmd ("queue simple set " . $i . " queue=your-custom-queue-type/your-custom-queue-type total-queue=your-custom-queue-type")
:execute $cmd
}
Credit: https://www.o-om.com
Tekshirish
Skript ishga tushgandan keyin simple queue’lar ro‘yxatini ko‘rib, har bir yozuvda queue va total‑queue maydonlari tanlangan qiymatga o‘zgarganligini tasdiqlang.
Diqqat:
- Skript barcha simple queue’larni birdaniga o‘zgartiradi, shuning uchun avval zaxira olish tavsiya etiladi.
- Noto‘g‘ri queue turi tanlansa, trafik cheklovlari kutilganidan farq qilishi mumkin.
Xulosa
Ushbu skript yordamida Simple Queue turlarini bir necha soniyada o‘zgartirish mumkin. Kerakli turni tanlang, skriptni ishga tushiring va natijani tekshiring.
Manba: Change all Queue type in Queue Simple — mikrotiktool.github.io