X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcollectd.c;h=4e521f9f6b40835ab34d16896717ffc347e99e2c;hb=9d5a7847b03d78a94b6a0b153abeb630b4b94ddd;hp=70223b7dde98d58ac872a4b5a69efdfea83d447a;hpb=4a5e97d6e317ee050b0a942e50159473a7d144dc;p=collectd.git diff --git a/src/collectd.c b/src/collectd.c index 70223b7d..4e521f9f 100644 --- a/src/collectd.c +++ b/src/collectd.c @@ -29,7 +29,10 @@ #include "plugin.h" #include "configfile.h" -#include "types_list.h" + +#if HAVE_STATGRAB_H +# include +#endif /* * Global variables @@ -88,7 +91,11 @@ static int init_hostname (void) status = getaddrinfo (hostname_g, NULL, &ai_hints, &ai_list); if (status != 0) { - ERROR ("getaddrinfo failed."); + ERROR ("Looking up \"%s\" failed. You have set the " + "\"FQDNLookup\" option, but I cannot resolve " + "my hostname to a fully qualified domain " + "name. Please fix you network " + "configuration.", hostname_g); return (-1); } @@ -216,7 +223,7 @@ static void update_kstat (void) /* TODO * Remove all settings but `-f' and `-C' */ -static void exit_usage (char *name) +static void exit_usage (void) { printf ("Usage: "PACKAGE" [OPTIONS]\n\n" @@ -260,7 +267,6 @@ static int do_init (void) } #endif - read_types_list (); plugin_init_all (); return (0); @@ -290,7 +296,7 @@ static int do_loop (void) #endif /* Issue all plugins */ - plugin_read_all (&loop); + plugin_read_all (); if (gettimeofday (&tv_now, NULL) < 0) { @@ -406,7 +412,7 @@ int main (int argc, char **argv) #endif /* COLLECT_DAEMON */ case 'h': default: - exit_usage (argv[0]); + exit_usage (); } /* switch (c) */ } /* while (1) */