From: Florian Eckert Date: Wed, 21 Mar 2018 13:13:57 +0000 (+0100) Subject: net/mwan3: add logging on ping success and fail X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=1eae1ae3e726b11c293266d81985534b3cd552d3;p=feed%2Fpackages.git net/mwan3: add logging on ping success and fail Add logging information during state change on ping success or fail Signed-off-by: Florian Eckert --- diff --git a/net/mwan3/files/usr/sbin/mwan3track b/net/mwan3/files/usr/sbin/mwan3track index e8080b59c0..fb72e99a3f 100755 --- a/net/mwan3/files/usr/sbin/mwan3track +++ b/net/mwan3/files/usr/sbin/mwan3track @@ -117,9 +117,15 @@ main() { if [ $? -eq 0 ]; then let host_up_count++ echo "up" > /var/run/mwan3track/$1/TRACK_${track_ip} + if [ $score -le $up ]; then + $LOG info "Check ($track_method) success for target \"$track_ip\" on interface $1 ($2)" + fi else let lost++ echo "down" > /var/run/mwan3track/$1/TRACK_${track_ip} + if [ $score -gt $up ]; then + $LOG info "Check ($track_method) failed for target \"$track_ip\" on interface $1 ($2)" + fi fi else echo "skipped" > /var/run/mwan3track/$1/TRACK_${track_ip}