Anda di halaman 1dari 1

Syarat :

- hanya berlaku untuk static IP atau user yang Simple Que nya bisa diedit (dibuat
manual)
- script berjalan dgn mengecek comment jadi target di Simple queue comment harus
diisi
- script melihat total-bytes, maka total queue type harus dirubah default agar
total-bytes hidup
- script ada 2 dijalankan di scheduler

#-----------
#script 1 cek Quota
#FB grup : BELAJAR BERSAMA
#copas di scheduler interval terserah (contoh 1 jam)
#rubah 3200000000 (3,2 GB) sesuai keinginan untuk batas FUP
#rubah max limit dst untuk limit kalo melebihi FUP

{
:foreach QS in=[/queue simple find where comment="Static"] do={
local by [/queue simple get $QS total-bytes];
local nama [/queue simple get $QS name];
:if ($by>"3200000000") do={/queue simple set $QS max-limit="768k/768k" burst-
limit="0/0" burst-threshold="0/0" burst-time="0/0";
local con [(($by)/1000000)];
log warning ("$nama melebihi FUP dengan pemakaian $con MB")
}
}
}

#-----------
#script 2 cek Reset Counter
#FB grup : BELAJAR BERSAMA
#copas di scheduler interval 1d 00:00:00 jam mulai terserah
#max limit baris 3 harus sama dengan yang di script 1 dan isi max limit yang normal
dibawahnya

{
/queue simple reset-counters [find where comment=Static];
:foreach QS in=[/queue simple find where max-limit="768k/768k"] do={
/queue simple set $QS max-limit="768k/1500k" burst-limit="0/2500k" burst-
threshold="0/1500k" burst-time="0/8s"};
}
}
}

Anda mungkin juga menyukai