#include "collectd.h"
#include "common.h"
-#include "network.h"
#include "plugin.h"
#include "configfile.h"
+#include "types_list.h"
/*
* Global variables
str = global_option_get ("Interval");
if (str == NULL)
- str = COLLECTD_STEP;
+ str = "10";
interval_g = atoi (str);
if (interval_g <= 0)
{
" Config-File "CONFIGFILE"\n"
" PID-File "PIDFILE"\n"
" Data-Directory "PKGLOCALSTATEDIR"\n"
-#if COLLECT_DEBUG
- " Log-File "LOGFILE"\n"
-#endif
- " Step "COLLECTD_STEP" seconds\n"
- " Heartbeat "COLLECTD_HEARTBEAT" seconds\n"
"\n"PACKAGE" "VERSION", http://collectd.org/\n"
"by Florian octo Forster <octo@verplant.org>\n"
"for contributions see `AUTHORS'\n");
}
#endif
+ read_types_list ();
plugin_init_all ();
return (0);
struct sigaction sigIntAction;
struct sigaction sigTermAction;
char *configfile = CONFIGFILE;
+ int test_config = 0;
const char *basedir;
#if COLLECT_DAEMON
struct sigaction sigChldAction;
{
int c;
- c = getopt (argc, argv, "hC:"
+ c = getopt (argc, argv, "htC:"
#if COLLECT_DAEMON
"fP:"
#endif
case 'C':
configfile = optarg;
break;
+ case 't':
+ test_config = 1;
+ break;
#if COLLECT_DAEMON
case 'P':
global_option_set ("PIDFile", optarg);
if (init_global_variables () != 0)
return (1);
+ if (test_config)
+ return (0);
+
#if COLLECT_DAEMON
/*
* fork off child