Код: Выделить всё
:local alltraf;
:local totaltraf;
:local namerule;
:local upload;
:local download;
:local allrules ([/queue simple print count-only] -1);
:for y from=0 to=$allrules do={:set alltraf [/que s get number=$y byte]; :set namerule [/que s get number=$y name]; :set upload [:pick $alltraf 0 ([:find $alltraf "/"]-1)]; :set download [:pick $alltraf ([:find $alltraf "/"]+1) [:len $alltraf]]; :set totaltraf (($upload + $download) / 1048576); :put $totaltraf; :if ($totaltraf >= 300 ) do={ /queue simple set [find name="$namerule"] max-limit="256k/128k"}}