From: octo Date: Wed, 15 Mar 2006 11:43:33 +0000 (+0000) Subject: Replaced the static 10 with `COLLECTD_STEP' in src/{collectd,common}.c X-Git-Tag: collectd-3.8.6^2~92^2~7 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=574a548ca204f2bac09119991a52333eb72ed1cb;p=collectd.git Replaced the static 10 with `COLLECTD_STEP' in src/{collectd,common}.c --- diff --git a/src/collectd.c b/src/collectd.c index 7f2f6e8c..47745cb0 100644 --- a/src/collectd.c +++ b/src/collectd.c @@ -138,6 +138,8 @@ static void exit_usage (char *name) #if COLLECT_DEBUG " Log-File "LOGFILE"\n" #endif + " Step "COLLECTD_STEP" seconds\n" + " Heartbeat "COLLECTD_HEARTBEAT" seconds\n" "\n"PACKAGE" "VERSION", http://verplant.org/collectd/\n" "by Florian octo Forster \n" "for contributions see `AUTHORS'\n"); @@ -147,6 +149,11 @@ static void exit_usage (char *name) static int start_client (void) { int sleepingtime; + int step; + + step = atoi (COLLECTD_STEP); + if (step <= 0) + step = 10; #if HAVE_LIBKSTAT kc = NULL; @@ -177,7 +184,7 @@ static int start_client (void) #endif plugin_read_all (); - sleepingtime = 10; + sleepingtime = step; while (sleepingtime != 0) { if (loop != 0) diff --git a/src/common.c b/src/common.c index 50a563a3..8393d8bb 100644 --- a/src/common.c +++ b/src/common.c @@ -307,7 +307,7 @@ int rrd_create_file (char *filename, char **ds_def, int ds_num) argv[0] = "create"; argv[1] = filename; argv[2] = "-s"; - argv[3] = "10"; + argv[3] = COLLECTD_STEP; j = 4; for (i = 0; i < ds_num; i++)