AntonS Posted March 8, 2010 Posted March 8, 2010 Добрый день кто нибудь писал уже скрипт для поднятия скорости день\ночь у существующих ng интерфесов? через ngctl Вставить ник Quote
AntonS Posted March 8, 2010 Author Posted March 8, 2010 делаю router# ngctl msg ng1:inet.0-0-m getconf Rec'd response "getconf" (4) from "[2c7d9a]:": Args: { upstream={ cbs=192000 ebs=384000 cir=1024000 greenAction=1 yellowAction=1 redAction=2 mode=2 } downstream={ cbs=192000 ebs=384000 cir=1024000 greenAction=1 yellowAction=1 redAction=2 mode=2 } } и смотрим что вдругую сторону router# ngctl msg ng1:inet.1-0-m getconf Rec'd response "getconf" (4) from "[2c7d9b]:": Args: { upstream={ cbs=192000 ebs=384000 cir=1024000 greenAction=1 yellowAction=1 redAction=2 mode=2 } downstream={ cbs=192000 ebs=384000 cir=1024000 greenAction=1 yellowAction=1 redAction=2 mode=2 } } хочу поменять router# ngctl msg ng1:inet.0-0-m setconf { upstream={ cbs=192000 ebs=384000 cir=2048000 greenAction=1 yellowAction=1 redAction=2 mode=2 } downstream={ cbs=192000 ebs=384000 cir=2048000 greenAction=1 yellowAction=1 redAction=2 mode=2 } } пишет Отсутствует }. Вставить ник Quote
littlesavage Posted March 8, 2010 Posted March 8, 2010 (edited) Экранировать их надо. Ну или примерно так: printf "msg %s:inet.0-0-m setconf { upstream={ cbs=%u ebs=%u cir=%u greenAction=1 yellowAction=1 redAction=2 mode=2 } downstream={ cbs=%u ebs=%u cir=%u greenAction=1 yellowAction=1 redAction=2 mode=2 } }\n" ng1 192000 384000 2048000 192000 384000 2048000 | /usr/sbin/ngctl -f - Edited March 8, 2010 by littlesavage Вставить ник Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.