Jump to content
Калькуляторы

mpd5 + ng_car поднять скорость

Добрый день

кто нибудь писал уже скрипт для поднятия скорости день\ночь у существующих ng интерфесов?

через ngctl

 

Share this post


Link to post
Share on other sites

делаю

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 } }

 

пишет Отсутствует }.

Share this post


Link to post
Share on other sites

Экранировать их надо.

Ну или примерно так:

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 by littlesavage

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this