2.9.7的脚本怎么改成3.2的呢?懂脚本的朋友进来改改呀~!
#定义变量(注意在Ros2.8中可以不要后面的0):local RxCurRate
:local RxCurSet
:local RxResRate
:local RxMaxRate
:local RxStepRate
#下行即时流量
#interface monitor Wan once do={:set RxCurRate $received-bits-per-second}
interface monitor Lan once do={:set RxCurRate $sent-bits-per-second}
#下行当前设置
:set RxCurSet pcq-rate]
#下行预留带宽(256000-512000)
:set RxResRate 400000
#下行最大带宽(路由器出口带宽)
:set RxMaxRate 17000000
#下行免设置范围(40000-400000)
:set RxRangRate 200000
#下行 加大限制带宽
:if($RxCurRate<($RxMaxRate+-$RxResRate+-$RxRangRate)&&$RxCurSet<$RxMaxRate) do={
:set RxCurSet ($RxCurSet+($RxRangRate)/2)
:if($RxCurSet>$RxMaxRate) do={:set RxCurSet $RxMaxRate}
/queue type set "PCQ-Download" kind=pcq pcq-rate=$RxCurSet pcq-classifier=dst-address
#下一句为监测写硬盘次数
/system script run SCRIPT_HD_WRITE
}
#下行 减少限制带宽
:if($RxCurRate>($RxMaxRate+-$RxResRate+$RxRangRate)&&$RxCurSet>$RxResRate) do={
:set RxCurSet ($RxCurSet+($RxMaxRate+-$RxResRate+-$RxCurRate)/2)
:if($RxCurSet<$RxResRate) do={:set RxCurSet $RxResRate}
/queue type set "PCQ-Download" kind=pcq pcq-rate=$RxCurSet pcq-classifier=dst-address
#下一句为监测写硬盘次数
/system script run SCRIPT_HD_WRITE
}
#:set RxCurSet ($RxCurSet+($RxMaxRate+-$RxResRate+-$RxCurRate)/2)
#
####程序结束###################################################################### 转成 3.3或4.X也行啊 ,那位高手帮帮忙呀~!! 再顶下, 希望高手帮忙。:victory: {:2_37:}有了 自己搜索下吧 好像我有发过3.x的 好像我有发过3.x的
WGHBOY 发表于 2010-6-17 22:13 http://bbs.routerclub.com/images/common/back.gif
:global "RxCurRate" 0
:global "RxCurSet" 0
:global "RxResRate" 0
:global "RxMaxRate" 0
:global "RxStepRate" 0
:global "RxRangRate" 0
interface monitor pppoe-out1 once do={:set "RxCurRate" $"received-bits-per-second"}
:set RxCurSet pcq-rate]
:set RxResRate 320000
:set RxMaxRate 2500000
:set RxRangRate 100000
:if ($"RxCurRate"<($RxMaxRate+-$RxResRate+-$RxRangRate)&&$RxCurSet<$RxMaxRate) do={
:set RxCurSet ($RxCurSet+($RxMaxRate+-$RxResRate+-$RxCurRate)/2)
:if ($"RxCurSet">$RxMaxRate) do={:set RxCurSet $RxMaxRate}
/queue type set "adsl_1" kind=pcq pcq-rate=$RxCurSet pcq-classifier=dst-address
}
:if ($"RxCurRate">($RxMaxRate+-$RxResRate+$RxRangRate)&&$RxCurSet>$RxResRate) do={
:set RxCurSet ($RxCurSet+($RxMaxRate+-$RxResRate+-$RxCurRate)/2)
:if ($"RxCurSet"<$RxResRate) do={:set RxCurSet $RxResRate}
/queue type set "adsl_1" kind=pcq pcq-rate=$RxCurSet pcq-classifier=dst-address
}
3.2的不行啊 3.13的没问题。
能帮忙改成3.2的吗?
页:
[1]