怎样用脚本删除ros的限速
你好!这是我限速脚本生成代码:global IsRun true
:global RxCurRate 100000
:global RxCurSet 500000
:global RxMaxRate 800000
:global RxMinRate 200000
:global RxSwRate 1200000
:global TxCurRate 100000
:global TxCurSet 100000
:global TxMaxRate 400000
:global TxMinRate 100000
:global TxSwRate 800000
:global StepRatedn 200000
:global StepRateup 20000
/interface monitor-traffic LAN once do={:set TxCurRate $received-bits-per-second}
/interface monitor-traffic LAN once do={:set RxCurRate $sent-bits-per-second}
#设置单IP下行带宽新值
:if ($RxCurRate<$RxSwRate) do={:if ($RxCurSet<$RxMaxRate) do={:set RxCurSet ($RxCurSet + $StepRatedn)}} else={ :if ($RxCurSet>$RxMinRate) do={:set RxCurSet ($RxCurSet + -$StepRatedn)}}
#设置单IP上行带宽新值
:if ($TxCurRate<$TxSwRate) do={:if ($TxCurSet<$TxMaxRate) do={:set TxCurSet ($TxCurSet + $StepRateup)}} else={:if ($TxCurSet>$TxMinRate) do={:set TxCurSet ($TxCurSet + -$StepRateup)}}
:foreach i in= do={:set useraddress ;
:set founded ;
:if ($founded="") do={/queue simple add name=$useraddresstarget=$useraddress limit-at=[:tostr ($TxCurSet . "/" . $RxCurSet)]max-limit=[:tostr (($TxCurSet * 2) . "/" . ($RxCurSet * 2))]}else={/queue sim en };
:foreach i in= do={:set tadd ; :set founded ; :if ($founded="") do={/queue sim dis }};
}
我想在生成限速前删除限速,求求大侠们帮帮忙
页:
[1]