diff options
author | Subhendu Ghosh <sghosh@users.sourceforge.net> | 2003-02-18 03:17:37 (GMT) |
---|---|---|
committer | Subhendu Ghosh <sghosh@users.sourceforge.net> | 2003-02-18 03:17:37 (GMT) |
commit | 2d3e6c49ad8de1a9fb466b59c1b5b69405c39aa8 (patch) | |
tree | fdbacb9a98b92316306ae2f95c305eba7d3c6512 | |
parent | f8d47eb2da6167836f0fb6ed58e605530f95e0ca (diff) | |
download | monitoring-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
-rw-r--r-- | configure.in | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/configure.in b/configure.in index c9a9615..dc5f281 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" |
872 | fi | 872 | fi |
873 | 873 | ||
874 | dnl SWAP info required is amount allocated/available and amount free | ||
875 | dnl The plugin works through all the swap devices and adds up the total swap | ||
876 | dnl available. | ||
877 | |||
874 | dnl dunno why this does not work below - use hack (kbd) | 878 | dnl dunno why this does not work below - use hack (kbd) |
875 | dnl fine on linux, broken on solaris | 879 | dnl fine on linux, broken on solaris |
876 | dnl if /bin/test -e "/proc/meminfo" | 880 | dnl 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" |
904 | elif [swapinfo -k 2>&1 | egrep -i "Device" >/dev/null] | 908 | elif [swapinfo -k 2>&1 | egrep -i "^Device" >/dev/null] |
905 | then | 909 | then |
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" |
916 | elif [swapinfo -d 2>/dev/null | egrep -i "^TYPE +AVAIL +USED +FREE" >/dev/null] | 920 | elif [swapinfo -dfM 2>/dev/null | egrep -i "^TYPE +AVAIL +USED +FREE" >/dev/null] |
917 | then | 921 | then |
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" |
923 | fi | 927 | fi |