Группа :: Мониторинг
Пакет: xymon
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: xymonclient-linux.sh-ifconfig-route.patch
Скачать
Скачать
diff -Nur xymon-4.3.11.old/client/xymonclient-linux.sh xymon-4.3.11/client/xymonclient-linux.sh
--- a/xymon-4.3.11.old/client/xymonclient-linux.sh 2014-01-22 18:58:12.000000000 +0400
+++ b/xymon-4.3.11/client/xymonclient-linux.sh 2014-01-22 19:15:05.737099953 +0400
@@ -42,16 +42,34 @@
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]"
# Bug in RedHat's netstat spews annoying error messages.
netstat -ant 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]"