* collectd: The read-function has been changed to read many plugins in
parallel, using threads. Thus, plugins generally need to use
thread-safe functions from now on.
- * csv plugin: The new `csv' plugin handles output to `comma seperated
+ * collectd: The '-t' command line options allows to perform syntax tests
+ of the configuration file and exit immediately.
+ * csv plugin: The new `csv' plugin handles output to `comma separated
values'-files.
* rrdtool plugin: The new `rrdtool' plugin handles output to
RRD-files. Data can be cached to combine multiple updates into one
plugin.
* irq plugin: The new `irq' plugin collects the IRQ-counters. Thanks
to Peter Holik for contributing this plugin.
- * nut plugin: The new `nut' plugin connects the the upsd of the
- `network ups tools' and reads information about the connected UPS.
+ * nut plugin: The new `nut' plugin connects the upsd of the `network
+ ups tools' and reads information about the connected UPS.
* apache plugin: Support for lighttpd's `BusyServers' (aka.
connections) field was added by Florent Monbillard.
* collectd-nagios: The new `collectd-nagios' binary queries values
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
collectd is a daemon that receives system statistics and makes them available
in a number of ways. The main daemon itself doesn't have any real functionality
-appart from loading, querying and submitting to plugins. For a description of
+apart from loading, querying and submitting to plugins. For a description of
available plugins please see L</PLUGINS> below.
=head1 OPTIONS
change B<collectd>'s behavior. The path may be relative to the current working
directory.
+=item B<-t>
+
+Test the configuration only. The program immediately exits after parsing the
+config file. A return code not equal to zero indicates an error.
+
=item B<-P> I<E<lt>pid-fileE<gt>>
Specify an alternative pid file. This overwrites any settings in the config