From afb62ead1b66b922854dae97f388373c4cc1e899 Mon Sep 17 00:00:00 2001 From: Babak Farrokhi Date: Wed, 8 Feb 2017 12:30:20 +0330 Subject: [PATCH] Import updates from NetOS --- multiping_ | 2 +- netirq_ | 3 ++- netisr_ | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/multiping_ b/multiping_ index f62ef32..d2072c1 100755 --- a/multiping_ +++ b/multiping_ @@ -44,7 +44,7 @@ SCRIPT_NAME=$(basename $0) SRC=`echo $SCRIPT_NAME | sed -n s/multiping_//p` FPING=`which fping` || ( echo "fping required but not found"; exit 1) FSRC=`echo ${SRC} | sed 's/\./_/g'` -IPS=`ifconfig ${interface} | awk '/inet /{print $2}' | grep -Ev '^(10|192)\.'` +IPS=`ifconfig ${interface} | grep -v tunnel | awk '/inet /{print $2}' | grep -Ev '^(10|192|127)\.'` if [ $# -lt 1 ]; then diff --git a/netirq_ b/netirq_ index c95e1c3..7bdd910 100755 --- a/netirq_ +++ b/netirq_ @@ -88,7 +88,8 @@ BEGIN { /'${STAT_TYPE}'/ { split($1,name,":"); - print name[1]".label "$1; + gsub(/ /,"", $1); + print name[1]".label " $1; print name[1]".type DERIVE"; print name[1]".min 0"; print name[1]".draw LINE2"; diff --git a/netisr_ b/netisr_ index 5b4779d..0b60fbd 100755 --- a/netisr_ +++ b/netisr_ @@ -58,7 +58,7 @@ if [ $# -lt 1 ]; then elif [ "$1" == "suggest" ]; then - awk '/---/{print $1}' ${STATFILE} + awk '/--$/{print $1}' ${STATFILE} elif [ "$1" == "autoconf" ]; then ${NETSTAT} -Q >/dev/null 2>&1 && echo yes || echo no