diff -Nur xymon-4.3.30.old/client/xymonclient-linux.sh xymon-4.3.30/client/xymonclient-linux.sh --- a/xymon-4.3.30.old/client/xymonclient-linux.sh 2019-10-23 09:38:09.879112887 +0400 +++ b/xymon-4.3.30/client/xymonclient-linux.sh 2019-10-23 10:59:03.597821726 +0400 @@ -61,9 +61,21 @@ echo "[free]" free echo "[ifconfig]" -/sbin/ifconfig 2>/dev/null -echo "[route]" -netstat -rn +# A host can contains a huge number of interfaces and +# they can be controled by another statistic system +if test "$IFACES" == ""; then + /sbin/ifconfig 2>/dev/null +elif test "$IFACES" != "NONE"; then + for IFACE in $IFACES; do + /sbin/ifconfig $IFACE 2>/dev/null + done +fi +# A host can contains a huge routing table (OSPF/BGP for example). +# So the ability to lock this statistics is needed. +if test "$NEEDROUTES" != "NO"; then + echo "[route]" + netstat -rn +fi echo "[netstat]" netstat -s echo "[ports]" @@ -73,7 +85,13 @@ netstat -antuW 2>/dev/null netstat -antuT 2>/dev/null echo "[ifstat]" -/sbin/ifconfig 2>/dev/null +if test "$IFACES" == ""; then + /sbin/ifconfig 2>/dev/null +elif test "$IFACES" != "NONE"; then + for IFACE in $IFACES; do + /sbin/ifconfig $IFACE 2>/dev/null + done +fi # Report mdstat data if it exists if test -r /proc/mdstat; then echo "[mdstat]"; cat /proc/mdstat; fi echo "[ps]"