others: mwwatchdog: tune cktracert() a little

- thanks @rs232
arm-master
pedro 2 years ago
parent e073fc9e54
commit 1219e070dc

@ -188,8 +188,8 @@ cktracert() {
for IP in $IPLIST; do
RXBYTES1=$(cat /sys/class/net/$IFACE/statistics/rx_bytes 2>/dev/null)
# we need only send/receive few packages to be sure if connection works
traceroute -i $IFACE -n -w 1 -m 4 -q 1 -z 1 $IP &>/dev/null
usleep 200
traceroute -i $IFACE -n -w 1 -q 1 -z 1 $IP &>/dev/null
usleep 200000
RXBYTES2=$(cat /sys/class/net/$IFACE/statistics/rx_bytes 2>/dev/null)
[ "$RXBYTES2" -gt "$(($RXBYTES1 + $RXBYTES_MIN_DIFF))" ] && { RESULT=1; break; }
done

Loading…
Cancel
Save