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 | |||
1263 | dnl The plugin works through all the swap devices and adds up the total swap | 1263 | dnl The plugin works through all the swap devices and adds up the total swap |
1264 | dnl available. | 1264 | dnl available. |
1265 | AC_PATH_PROG(PATH_TO_SWAP,swap) | 1265 | AC_PATH_PROG(PATH_TO_SWAP,swap) |
1266 | AC_PATH_PROG(PATH_TO_SWAPINFO,swapinfo) | 1266 | if (test -n "$PATH_TO_SWAP") |
1267 | |||
1268 | dnl dunno why this does not work below - use hack (kbd) | ||
1269 | dnl fine on linux, broken on solaris | ||
1270 | dnl if /bin/test -e "/proc/meminfo" | ||
1271 | AC_MSG_CHECKING(for how to check memory) | ||
1272 | if [cat /proc/meminfo > /dev/null 2>&1] | ||
1273 | then | ||
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" | ||
1278 | fi | ||
1279 | |||
1280 | if ( test -n "$PATH_TO_SWAP" || test -n "$PATH_TO_SWAPINFO" ) | ||
1281 | then | 1267 | then |
1282 | 1268 | AC_MSG_CHECKING([for $PATH_TO_SWAP format]) | |
1283 | if [$PATH_TO_SWAP -l 2>&1 >/dev/null] | 1269 | if [$PATH_TO_SWAP -l 2>&1 >/dev/null] |
1284 | then | 1270 | then |
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" |
1295 | fi | ||
1296 | dnl end if for PATH_TO_SWAP | ||
1297 | fi | ||
1309 | 1298 | ||
1310 | elif [$PATH_TO_SWAPINFO -k 2>&1 | egrep -i "^Device" >/dev/null] | 1299 | AC_PATH_PROG(PATH_TO_SWAPINFO,swapinfo) |
1300 | if (test -n "$PATH_TO_SWAPINFO") | ||
1301 | then | ||
1302 | AC_MSG_CHECKING([for $PATH_TO_SWAPINFO format]) | ||
1303 | if [$PATH_TO_SWAPINFO -k 2>&1 | egrep -i "^Device" >/dev/null] | ||
1311 | then | 1304 | then |
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]) |
1330 | fi | 1323 | fi |
1324 | dnl end if for PATH_TO_SWAPINFO | ||
1325 | fi | ||
1326 | |||
1327 | AC_PATH_PROG(PATH_TO_LSPS,lsps) | ||
1328 | if (test -n "$PATH_TO_LSPS") | ||
1329 | then | ||
1330 | AC_MSG_CHECKING([for $PATH_TO_LSPS format]) | ||
1331 | if [$PATH_TO_LSPS -a 2>/dev/null | egrep -i "^Page Space" > /dev/null] | ||
1332 | then | ||
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]) | ||
1338 | fi | ||
1339 | dnl end if for PATH_TO_SWAPINFO | ||
1340 | fi | ||
1331 | 1341 | ||
1332 | if test "x$ac_cv_have_swap" != "x" | 1342 | if test "x$ac_cv_have_swap" != "x" |
1333 | then | 1343 | then |
@@ -1343,8 +1353,19 @@ then | |||
1343 | [Conversion factor to MB]) | 1353 | [Conversion factor to MB]) |
1344 | fi | 1354 | fi |
1345 | 1355 | ||
1346 | dnl End of if SWAP | 1356 | dnl dunno why this does not work below - use hack (kbd) |
1347 | fi | 1357 | dnl fine on linux, broken on solaris |
1358 | dnl if /bin/test -e "/proc/meminfo" | ||
1359 | AC_MSG_CHECKING([for /proc/meminfo]) | ||
1360 | if [cat /proc/meminfo > /dev/null 2>&1] | ||
1361 | then | ||
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" | ||
1366 | else | ||
1367 | AC_MSG_RESULT([no]) | ||
1368 | fi | ||
1348 | 1369 | ||
1349 | AC_PATH_PROG(PATH_TO_DIG,dig) | 1370 | AC_PATH_PROG(PATH_TO_DIG,dig) |
1350 | AC_DEFINE_UNQUOTED(PATH_TO_DIG,"$PATH_TO_DIG",[Path to dig command, if present]) | 1371 | AC_DEFINE_UNQUOTED(PATH_TO_DIG,"$PATH_TO_DIG",[Path to dig command, if present]) |