chengqiong 发表于 2013-6-29 00:15:56

自动限速脚本!高手帮忙看看!

:global jon
/
:if ($jon > 180 ) do={/system script run 0 }
/
:if ($jon < 180 ) do={/system script run 1 }
/
:if ($jon > 180 ) do={/log war 用户多余180户了,启动限速 }
/


这个脚本直接在终端运行 可以正常!
在scrpit 里面运行没有反映!

在sch 里面也是没有反映!
不知道那里做错了!

一个简单的限速。
高于180户是 运行脚本 0 启动3m限速

低于180户时候 运行脚本1 启动8m限速

谢谢

chengqiong 发表于 2013-6-29 00:19:59

找到问题了,中文不识别!换成英文就可以了!

chengqiong 发表于 2013-6-29 00:27:35

:global jon
/
:if ($jon > 180 ) do={/queue simple

set limit-at=1M/3M max-limit=1M/3M burst-limit=1M/3M burst-threshold=1M/3M burst-time=6s/6s}
/
:if ($jon < 180 ) do={/queue simple set max-limit=2M/8M limit-at=2M/2M burst-limit=2M/8M burst-threshold=2M/8M burst-time=6s/6s}
/
:log war $jon

chengqiong 发表于 2013-6-29 00:37:06

本帖最后由 chengqiong 于 2013-6-29 00:38 编辑

另外想请教下,自动让ros定时打开指定的url。我的ddns是通过url更新的,怎么让ros 打开ddns的url啊!多谢了
我用的是minidns做的动态dns!
免费 可以绑定5个域名!

47771885 发表于 2013-6-29 07:22:19

/system scheduler
:delay 10
add disabled=no interval=0s name=xs on-event="/tool fetch url=\"http://xxxx\"mode=http" policy=\
    ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api \
    start-time=startup
或许可以

chengqiong 发表于 2013-6-29 10:09:29

不行,提示404 nofound

chengqiong 发表于 2013-6-29 10:12:27

/system scheduler> /tool fetch url="xxx"mode=http
failure: invalid URL
现在打开个百度就提示这个

tool fetch 这个到底怎么用啊,我在官方文档里面看到说明不详细!

chengqiong 发表于 2013-6-29 10:41:12


这个是出来的截图,不让发url
高手帮忙看看!

直接在浏览器里面打开的话,就会提示更新成功!

chengqiong 发表于 2013-7-1 10:45:23

高手怎么没人回答啊!
页: [1]
查看完整版本: 自动限速脚本!高手帮忙看看!