mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2026-03-13 12:32:29 +01:00
questd: imonitor: bring down and up the wireless radios when bsd or acsd crashes
This commit is contained in:
parent
676e40a0cc
commit
fb983f5dbc
1 changed files with 15 additions and 7 deletions
|
|
@ -140,9 +140,13 @@ check_ubus_network_call() {
|
|||
|
||||
restart_bsd()
|
||||
{
|
||||
logger -s -t $0[$$] "Restarting bsd."
|
||||
killall -q -KILL bsd
|
||||
bsd
|
||||
logger -s -t $0[$$] "Restarting WiFi and Band Steering daemon due to bsd hangup."
|
||||
killall -q -15 bsd 2>/dev/null
|
||||
wlctl -i wl0 down 2>/dev/null
|
||||
wlctl -i wl1 down 2>/dev/null
|
||||
wlctl -i wl0 up 2>/dev/null
|
||||
wlctl -i wl1 up 2>/dev/null
|
||||
bsd &
|
||||
}
|
||||
|
||||
check_bsdcall()
|
||||
|
|
@ -159,9 +163,13 @@ check_bsdcall()
|
|||
|
||||
restart_acsd()
|
||||
{
|
||||
logger -s -t $0[$$] "Restarting acsd."
|
||||
killall -q -KILL acsd
|
||||
acsd &
|
||||
logger -s -t $0[$$] "Restarting WiFi and Auto Channel Selection daemon due to acsd high CPU usage."
|
||||
killall -q -9 acsd 2>/dev/null
|
||||
wlctl -i wl0 down 2>/dev/null
|
||||
wlctl -i wl1 down 2>/dev/null
|
||||
wlctl -i wl0 up 2>/dev/null
|
||||
wlctl -i wl1 up 2>/dev/null
|
||||
acsd
|
||||
}
|
||||
|
||||
check_acsd()
|
||||
|
|
@ -173,7 +181,7 @@ check_acsd()
|
|||
|
||||
for p in $pcpu; do
|
||||
p=${p%%%*}
|
||||
if [ "$p" -ge "20" ]; then
|
||||
if [ "$p" -ge "40" ]; then
|
||||
return 1
|
||||
fi
|
||||
done
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue