Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37522785
en ru br
Репозитории ALT
S:4.3.30-alt2
5.1: 4.3.16-alt0.M51.1
www.altlinux.org/Changes

Группа :: Мониторинг
Пакет: xymon

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: xymonclient-linux.sh-ifconfig-route.patch
Скачать


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]"
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin