Zeleza Posted April 15 Share Posted April 15 (edited) Доброго всем дня Уважаемые гуру, прошу Вашей посильной помощи. Вопрос в следующем: что произошло с командой curl -s localhost:79/rci/show/rc/ppe в новой прошивке >4.1 и как теперь определить какой тип ускорения сейчас используется роутером? Ранее, я использовал функции ниже для определения типа ускорения fast_hw_enabled()(! curl -s localhost:79/rci/show/rc/ppe | grep hardware -C1 | grep -q false) fast_sw_enabled()(! curl -s localhost:79/rci/show/rc/ppe | grep software -C1 | grep -q false) И в ответах всегда фигурировали флаги true и false, сейчас такого нет в ответах curl -s localhost:79/rci/show/rc/ppe. Может, кто в курсе, как сейчас программно определить тип ускорения. @Le ecureuil, может Вы знаете, ответ на данный вопрос? Edited April 16 by Zeleza Quote Link to comment Share on other sites More sharing options...
TheBB Posted April 16 Share Posted April 16 KN-2110: root@Keenetic_Duo:~# ndmc -c show version | grep -E '(release|title)' release: 4.02.A.3.0-0 title: 4.2 Alpha 3 root@Keenetic_Duo:~# disabled root@Keenetic_Duo:~# root@Keenetic_Duo:~# curl -s localhost:79/rci/show/rc/ppe [ { "engine": "software" }, { "enabled": false, "engine": "hardware" } root@Keenetic_Duo:~# ndmc -c show rc ppe | grep -B1 hard | grep enabled enabled: no root@Keenetic_Duo:~# root@Keenetic_Duo:~# if [ -z "$(ndmc -c show rc ppe | grep -B1 hard | grep enabled)" ]; then echo "hardware enabled"; else echo "hardware disabled"; fi hardware disabled root@Keenetic_Duo:~# enabled root@Keenetic_Duo:~# root@Keenetic_Duo:~# curl -s localhost:79/rci/show/rc/ppe [ { "engine": "software" }, { "engine": "hardware" } ]root@Keenetic_Duo:~# root@Keenetic_Duo:~# ndmc -c show rc ppe | grep -B1 hard | grep enabled root@Keenetic_Duo:~# root@Keenetic_Duo:~# if [ -z "$(ndmc -c show rc ppe | grep -B1 hard | grep enabled)" ]; then echo "hardware enabled"; else echo "hardware disabled"; fi hardware enabled root@Keenetic_Duo:~# 1 Quote Link to comment Share on other sites More sharing options...
Zeleza Posted April 16 Author Share Posted April 16 4 минуты назад, TheBB сказал: disabled Логику понял. Благодарю. Quote Link to comment Share on other sites More sharing options...
TheBB Posted April 16 Share Posted April 16 на всякий случай - из ZyXEL Keenetic Ultra II ~ # ndmc -c show rc ppe config, name = ppe: engine: hardware ~ # ~ # ndmc -c show rc ppe config, name = ppe: no: enabled: no engine: hardware ~ # 1 Quote Link to comment Share on other sites More sharing options...
Zeleza Posted April 16 Author Share Posted April 16 (edited) Обновленные функции определения выглядят теперь так: version_keen_os()(ndmc -c show version | grep version | head -1 | cut -d: -f2| tr -d ' ') is_os_4()([[ "$(version_keen_os)" =~ 4.* ]]) # ------------------------------------------------------------------------------------------ # проверка на доступность программного и аппаратного ускорения # ------------------------------------------------------------------------------------------ fast_hw_enabled()(flag=false; is_os_4 && flag=enable; ! curl -s localhost:79/rci/show/rc/ppe | grep hardware -C1 | grep -q ${flag}) fast_sw_enabled()(flag=false; is_os_4 && flag=enable; ! curl -s localhost:79/rci/show/rc/ppe | grep software -C1 | grep -q ${flag}) fastnet_enabled()(fast_hw_enabled || fast_sw_enabled) fastnet_support()(curl -s localhost:79/rci/show/version | grep -q ppe) Edited April 16 by Zeleza Quote Link to comment Share on other sites More sharing options...
vasek00 Posted April 16 Share Posted April 16 1 час назад, TheBB сказал: на всякий случай - из ZyXEL Keenetic Ultra II ~ # ndmc -c show rc ppe config, name = ppe: engine: hardware ~ # ~ # ndmc -c show rc ppe config, name = ppe: no: enabled: no engine: hardware ~ # На 42A4 на ARM ~ # ndmc -c show rc ppe config, name = ppe: engine: software config, name = ppe: engine: hardware ~ # 1 Quote Link to comment Share on other sites More sharing options...
TheBB Posted April 16 Share Posted April 16 KN-2710 в режиме extender-ретранслятор (как и ZKU2 выше) ~ # ndmc -c show rc ppe config, name = ppe: engine: hardware ~ # ~ # ndmc -c show rc ppe config, name = ppe: no: enabled: no engine: hardware ~ # Quote Link to comment Share on other sites More sharing options...
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.
Note: Your post will require moderator approval before it will be visible.