summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 81c3e68)
raw | patch | inline | side by side (parent: 81c3e68)
author | octo <octo> | |
Wed, 15 Mar 2006 11:10:04 +0000 (11:10 +0000) | ||
committer | octo <octo> | |
Wed, 15 Mar 2006 11:10:04 +0000 (11:10 +0000) |
configure.in | patch | blob | history | |
src/collectd.h | patch | blob | history |
diff --git a/configure.in b/configure.in
index 1b30df009370973281259ccf0a5d84930170be9a..2f3fdc52e6c8edb6d8073139a07b5edfeaabbec2 100644 (file)
--- a/configure.in
+++ b/configure.in
[Wether or not to use mysql library])
AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes")
+# Define `step' and `hearbeat' values..
+declare -i collectd_step=10
+declare -i collectd_heartbeat=25
+AC_ARG_WITH(step, [AS_HELP_STRING([--with-step=SECONDS], [Interval in which plugins are queried.])],
+[
+ if test "x$withval" != "xno" -a "x$withval" != "xyes"
+ then
+ declare -i tmp_collectd_step="$withval"
+ if test $tmp_collectd_step -gt 0
+ then
+ collectd_step=$tmp_collectd_step
+ let "collectd_heartbeat=$collectd_step*2"
+ fi
+ fi
+], [])
+AC_ARG_WITH(heartbeat, [AS_HELP_STRING([--with-heartbeat=SECONDS], [Heartbeat of the DS in generated RRD files.])],
+[
+ if test "x$withval" != "xno" -a "x$withval" != "xyes"
+ then
+ declare -i tmp_collectd_heartbeat="$withval"
+ if test $tmp_collectd_heartbeat -gt 0
+ then
+ collectd_heartbeat=$tmp_collectd_heartbeat
+ fi
+ fi
+], [])
+
+if test $collectd_step -ne 10
+then
+ AC_DEFINE_UNQUOTED(COLLECTD_STEP, $collectd_step, [Interval in which plugins are queried.])
+fi
+if test $collectd_heartbeat -ne 25
+then
+ AC_DEFINE_UNQUOTED(COLLECTD_HEARTBEAT, "$collectd_heartbeat", [Interval in which plugins are queried.])
+fi
+
#
# Check for enabled/disabled features
#
Features:
debug . . . . . . . $enable_debug
daemon mode . . . . $enable_daemon
+ step . . . . . . . $collectd_step seconds
+ heartbeat . . . . . $collectd_heartbeat seconds
Modules:
battery . . . . . . $enable_battery
diff --git a/src/collectd.h b/src/collectd.h
index 89153f9335dddd22ee9667a2ae66f5aedbdcf379..d00dce326b568b2ff11526ca2bd6d17fc7aac39c 100644 (file)
--- a/src/collectd.h
+++ b/src/collectd.h
#define MODE_CLIENT 0x02
#define MODE_LOCAL 0x04
+#ifndef COLLECTD_STEP
+# define COLLECTD_STEP 10
+#endif
+
+#ifndef COLLECTD_HEARTBEAT
+# define COLLECTD_HEARTBEAT "25"
+#endif
+
extern time_t curtime;
#ifdef HAVE_LIBRRD