summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2003-09-17 09:31:56 (GMT)
committerTon Voon <tonvoon@users.sourceforge.net>2003-09-17 09:31:56 (GMT)
commit4fe50f4297fa4b34d28c2d39ab83e5d2db4e1193 (patch)
tree145b6f954fb99c75bc75df83c7477bd30b4b6aa6 /configure.in
parenta0e099de2bb62c6b48587d75b2601f605ff14aad (diff)
downloadmonitoring-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.in59
1 files changed, 40 insertions, 19 deletions
diff --git a/configure.in b/configure.in
index 09e8e35..0999d7e 100644
--- a/configure.in
+++ b/configure.in
@@ -1263,23 +1263,9 @@ dnl SWAP info required is amount allocated/available and amount free
1263dnl The plugin works through all the swap devices and adds up the total swap 1263dnl The plugin works through all the swap devices and adds up the total swap
1264dnl available. 1264dnl available.
1265AC_PATH_PROG(PATH_TO_SWAP,swap) 1265AC_PATH_PROG(PATH_TO_SWAP,swap)
1266AC_PATH_PROG(PATH_TO_SWAPINFO,swapinfo) 1266if (test -n "$PATH_TO_SWAP")
1267
1268dnl dunno why this does not work below - use hack (kbd)
1269dnl fine on linux, broken on solaris
1270dnl if /bin/test -e "/proc/meminfo"
1271AC_MSG_CHECKING(for how to check memory)
1272if [cat /proc/meminfo > /dev/null 2>&1]
1273then
1274 AC_MSG_RESULT([found /proc/meminfo])
1275 AC_DEFINE(HAVE_PROC_MEMINFO,1,[Define if we have /proc/meminfo])
1276 AC_DEFINE_UNQUOTED(PROC_MEMINFO,"/proc/meminfo",[path to /proc/meminfo if name changes])
1277 EXTRAS="$EXTRAS check_swap"
1278fi
1279
1280if ( test -n "$PATH_TO_SWAP" || test -n "$PATH_TO_SWAPINFO" )
1281then 1267then
1282 1268AC_MSG_CHECKING([for $PATH_TO_SWAP format])
1283if [$PATH_TO_SWAP -l 2>&1 >/dev/null] 1269if [$PATH_TO_SWAP -l 2>&1 >/dev/null]
1284then 1270then
1285 ac_cv_have_swap=yes 1271 ac_cv_have_swap=yes
@@ -1306,8 +1292,15 @@ then
1306 1292
1307 fi 1293 fi
1308 EXTRAS="$EXTRAS check_swap" 1294 EXTRAS="$EXTRAS check_swap"
1295fi
1296dnl end if for PATH_TO_SWAP
1297fi
1309 1298
1310elif [$PATH_TO_SWAPINFO -k 2>&1 | egrep -i "^Device" >/dev/null] 1299AC_PATH_PROG(PATH_TO_SWAPINFO,swapinfo)
1300if (test -n "$PATH_TO_SWAPINFO")
1301then
1302AC_MSG_CHECKING([for $PATH_TO_SWAPINFO format])
1303if [$PATH_TO_SWAPINFO -k 2>&1 | egrep -i "^Device" >/dev/null]
1311then 1304then
1312 ac_cv_have_swap=yes 1305 ac_cv_have_swap=yes
1313 ac_cv_swap_command="$PATH_TO_SWAPINFO -k" 1306 ac_cv_swap_command="$PATH_TO_SWAPINFO -k"
@@ -1328,6 +1321,23 @@ then
1328 ac_cv_swap_conv=1024 1321 ac_cv_swap_conv=1024
1329 AC_MSG_RESULT([using HP-UX format swapinfo]) 1322 AC_MSG_RESULT([using HP-UX format swapinfo])
1330fi 1323fi
1324dnl end if for PATH_TO_SWAPINFO
1325fi
1326
1327AC_PATH_PROG(PATH_TO_LSPS,lsps)
1328if (test -n "$PATH_TO_LSPS")
1329then
1330AC_MSG_CHECKING([for $PATH_TO_LSPS format])
1331if [$PATH_TO_LSPS -a 2>/dev/null | egrep -i "^Page Space" > /dev/null]
1332then
1333 ac_cv_have_swap=yes
1334 ac_cv_swap_command="$PATH_TO_LSPS -a"
1335 ac_cv_swap_format=["%*s %*s %*s %d%*s %d %*s"]
1336 ac_cv_swap_conv=1
1337 AC_MSG_RESULT([using AIX lsps])
1338fi
1339dnl end if for PATH_TO_SWAPINFO
1340fi
1331 1341
1332if test "x$ac_cv_have_swap" != "x" 1342if test "x$ac_cv_have_swap" != "x"
1333then 1343then
@@ -1343,8 +1353,19 @@ then
1343 [Conversion factor to MB]) 1353 [Conversion factor to MB])
1344fi 1354fi
1345 1355
1346dnl End of if SWAP 1356dnl dunno why this does not work below - use hack (kbd)
1347fi 1357dnl fine on linux, broken on solaris
1358dnl if /bin/test -e "/proc/meminfo"
1359AC_MSG_CHECKING([for /proc/meminfo])
1360if [cat /proc/meminfo > /dev/null 2>&1]
1361then
1362 AC_MSG_RESULT([found /proc/meminfo])
1363 AC_DEFINE(HAVE_PROC_MEMINFO,1,[Define if we have /proc/meminfo])
1364 AC_DEFINE_UNQUOTED(PROC_MEMINFO,"/proc/meminfo",[path to /proc/meminfo if name changes])
1365 EXTRAS="$EXTRAS check_swap"
1366else
1367 AC_MSG_RESULT([no])
1368fi
1348 1369
1349AC_PATH_PROG(PATH_TO_DIG,dig) 1370AC_PATH_PROG(PATH_TO_DIG,dig)
1350AC_DEFINE_UNQUOTED(PATH_TO_DIG,"$PATH_TO_DIG",[Path to dig command, if present]) 1371AC_DEFINE_UNQUOTED(PATH_TO_DIG,"$PATH_TO_DIG",[Path to dig command, if present])