diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2007-04-25 22:10:13 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2007-04-25 22:10:13 +0000 |
commit | d47be7a9e48242a25e356e2509f6fb774ae0be10 (patch) | |
tree | 1ea8e0185eda27100a26f43a98523f63695f2dfa /configure.in | |
parent | 27a624dd9f929af1330be508762057fa4fa8a0f5 (diff) | |
download | monitoring-plugins-d47be7a9e48242a25e356e2509f6fb774ae0be10.tar.gz |
check_load can optionally divide by number of cpus
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1700 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 54040ac9..891922ea 100644 --- a/configure.in +++ b/configure.in @@ -1054,6 +1054,14 @@ if test -n "$ac_cv_nslookup_command"; then AC_DEFINE_UNQUOTED(NSLOOKUP_COMMAND,"$ac_cv_nslookup_command", [path and args for nslookup]) fi +AC_MSG_CHECKING([for number of cpus]) +AC_TRY_COMPILE([#include <unistd.h>], + [sysconf(_SC_NPROCESSORS_CONF) > 0;], + AC_DEFINE(HAVE_SYSCONF__SC_NPROCESSORS_CONF,1,[Define if sysconf returns number of cpus]) + AC_MSG_RESULT([sysconf(_SC_NPROCESSORS_CONF)]), + AC_MSG_RESULT([cannot calculate]) + ) + AC_PATH_PROG(PATH_TO_UPTIME,uptime) AC_ARG_WITH(uptime_command, ACX_HELP_STRING([--with-uptime-command=PATH], |