diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2003-09-17 09:31:56 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2003-09-17 09:31:56 +0000 |
commit | 4fe50f4297fa4b34d28c2d39ab83e5d2db4e1193 (patch) | |
tree | 145b6f954fb99c75bc75df83c7477bd30b4b6aa6 /configure.in | |
parent | a0e099de2bb62c6b48587d75b2601f605ff14aad (diff) | |
download | monitoring-plugins-4fe50f4297fa4b34d28c2d39ab83e5d2db4e1193.tar.gz |
Support for check_swap in AIX (tested on 5.1)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@734 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 59 |
1 files changed, 40 insertions, 19 deletions
diff --git a/configure.in b/configure.in index 09e8e350..0999d7eb 100644 --- a/configure.in +++ b/configure.in @@ -1263,23 +1263,9 @@ dnl SWAP info required is amount allocated/available and amount free dnl The plugin works through all the swap devices and adds up the total swap dnl available. AC_PATH_PROG(PATH_TO_SWAP,swap) -AC_PATH_PROG(PATH_TO_SWAPINFO,swapinfo) - -dnl dunno why this does not work below - use hack (kbd) -dnl fine on linux, broken on solaris -dnl if /bin/test -e "/proc/meminfo" -AC_MSG_CHECKING(for how to check memory) -if [cat /proc/meminfo > /dev/null 2>&1] -then - AC_MSG_RESULT([found /proc/meminfo]) - AC_DEFINE(HAVE_PROC_MEMINFO,1,[Define if we have /proc/meminfo]) - AC_DEFINE_UNQUOTED(PROC_MEMINFO,"/proc/meminfo",[path to /proc/meminfo if name changes]) - EXTRAS="$EXTRAS check_swap" -fi - -if ( test -n "$PATH_TO_SWAP" || test -n "$PATH_TO_SWAPINFO" ) +if (test -n "$PATH_TO_SWAP") then - +AC_MSG_CHECKING([for $PATH_TO_SWAP format]) if [$PATH_TO_SWAP -l 2>&1 >/dev/null] then ac_cv_have_swap=yes @@ -1306,8 +1292,15 @@ then fi EXTRAS="$EXTRAS check_swap" +fi +dnl end if for PATH_TO_SWAP +fi -elif [$PATH_TO_SWAPINFO -k 2>&1 | egrep -i "^Device" >/dev/null] +AC_PATH_PROG(PATH_TO_SWAPINFO,swapinfo) +if (test -n "$PATH_TO_SWAPINFO") +then +AC_MSG_CHECKING([for $PATH_TO_SWAPINFO format]) +if [$PATH_TO_SWAPINFO -k 2>&1 | egrep -i "^Device" >/dev/null] then ac_cv_have_swap=yes ac_cv_swap_command="$PATH_TO_SWAPINFO -k" @@ -1328,6 +1321,23 @@ then ac_cv_swap_conv=1024 AC_MSG_RESULT([using HP-UX format swapinfo]) fi +dnl end if for PATH_TO_SWAPINFO +fi + +AC_PATH_PROG(PATH_TO_LSPS,lsps) +if (test -n "$PATH_TO_LSPS") +then +AC_MSG_CHECKING([for $PATH_TO_LSPS format]) +if [$PATH_TO_LSPS -a 2>/dev/null | egrep -i "^Page Space" > /dev/null] +then + ac_cv_have_swap=yes + ac_cv_swap_command="$PATH_TO_LSPS -a" + ac_cv_swap_format=["%*s %*s %*s %d%*s %d %*s"] + ac_cv_swap_conv=1 + AC_MSG_RESULT([using AIX lsps]) +fi +dnl end if for PATH_TO_SWAPINFO +fi if test "x$ac_cv_have_swap" != "x" then @@ -1343,8 +1353,19 @@ then [Conversion factor to MB]) fi -dnl End of if SWAP -fi +dnl dunno why this does not work below - use hack (kbd) +dnl fine on linux, broken on solaris +dnl if /bin/test -e "/proc/meminfo" +AC_MSG_CHECKING([for /proc/meminfo]) +if [cat /proc/meminfo > /dev/null 2>&1] +then + AC_MSG_RESULT([found /proc/meminfo]) + AC_DEFINE(HAVE_PROC_MEMINFO,1,[Define if we have /proc/meminfo]) + AC_DEFINE_UNQUOTED(PROC_MEMINFO,"/proc/meminfo",[path to /proc/meminfo if name changes]) + EXTRAS="$EXTRAS check_swap" +else + AC_MSG_RESULT([no]) +fi AC_PATH_PROG(PATH_TO_DIG,dig) AC_DEFINE_UNQUOTED(PATH_TO_DIG,"$PATH_TO_DIG",[Path to dig command, if present]) |