summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorSubhendu Ghosh <sghosh@users.sourceforge.net>2003-02-18 03:17:37 +0000
committerSubhendu Ghosh <sghosh@users.sourceforge.net>2003-02-18 03:17:37 +0000
commit2d3e6c49ad8de1a9fb466b59c1b5b69405c39aa8 (patch)
treefdbacb9a98b92316306ae2f95c305eba7d3c6512 /configure.in
parentf8d47eb2da6167836f0fb6ed58e605530f95e0ca (diff)
downloadmonitoring-plugins-2d3e6c49ad8de1a9fb466b59c1b5b69405c39aa8.tar.gz
regex fix to catch *BSD swapinfo and not HP-UX error and memory/file swap in addition to device for HP-UX
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@333 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in10
1 files changed, 7 insertions, 3 deletions
diff --git a/configure.in b/configure.in
index c9a9615b..dc5f2812 100644
--- a/configure.in
+++ b/configure.in
@@ -871,6 +871,10 @@ else
871 echo "** Could not find mailq or eqivalent" 871 echo "** Could not find mailq or eqivalent"
872fi 872fi
873 873
874dnl SWAP info required is amount allocated/available and amount free
875dnl The plugin works through all the swap devices and adds up the total swap
876dnl available.
877
874dnl dunno why this does not work below - use hack (kbd) 878dnl dunno why this does not work below - use hack (kbd)
875dnl fine on linux, broken on solaris 879dnl fine on linux, broken on solaris
876dnl if /bin/test -e "/proc/meminfo" 880dnl if /bin/test -e "/proc/meminfo"
@@ -901,7 +905,7 @@ then
901 echo " using Solaris format" 905 echo " using Solaris format"
902 fi 906 fi
903 EXTRAS="$EXTRAS check_swap" 907 EXTRAS="$EXTRAS check_swap"
904elif [swapinfo -k 2>&1 | egrep -i "Device" >/dev/null] 908elif [swapinfo -k 2>&1 | egrep -i "^Device" >/dev/null]
905then 909then
906 echo "found swapinfo command" 910 echo "found swapinfo command"
907 AC_DEFINE(HAVE_SWAP,1,[Define if swap/swapinfo command is found]) 911 AC_DEFINE(HAVE_SWAP,1,[Define if swap/swapinfo command is found])
@@ -913,11 +917,11 @@ then
913 echo " using FreeBSD format" 917 echo " using FreeBSD format"
914 fi 918 fi
915 EXTRAS="$EXTRAS check_swap" 919 EXTRAS="$EXTRAS check_swap"
916elif [swapinfo -d 2>/dev/null | egrep -i "^TYPE +AVAIL +USED +FREE" >/dev/null] 920elif [swapinfo -dfM 2>/dev/null | egrep -i "^TYPE +AVAIL +USED +FREE" >/dev/null]
917then 921then
918 AC_DEFINE(HAVE_SWAP,1,[Define if swap/swapinfo command is found]) 922 AC_DEFINE(HAVE_SWAP,1,[Define if swap/swapinfo command is found])
919 AC_PATH_PROG(PATH_TO_SWAP,swapinfo) 923 AC_PATH_PROG(PATH_TO_SWAP,swapinfo)
920 AC_DEFINE_UNQUOTED(SWAP_COMMAND,"/bin/sh '$PATH_TO_SWAP -d | /bin/tail -l +2'",[Path to swap/swapinfo binary, with any args]) 924 AC_DEFINE_UNQUOTED(SWAP_COMMAND,"$PATH_TO_SWAP -dfM",[Path to swap/swapinfo binary, with any args])
921 AC_DEFINE_UNQUOTED(SWAP_FORMAT,["%*s %d %*d %d"],[Format string for parsing swap output ]) 925 AC_DEFINE_UNQUOTED(SWAP_FORMAT,["%*s %d %*d %d"],[Format string for parsing swap output ])
922 echo " using HP-UX format HP-UX" 926 echo " using HP-UX format HP-UX"
923fi 927fi