X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fcollectd.c;h=4e521f9f6b40835ab34d16896717ffc347e99e2c;hb=e7929dac268957cbbd9082717759c3917ac1b51e;hp=c9ae66dd550cf8373ded07b341e2964991143b50;hpb=c88e459eb3823b766fc3a9ed37f25bc1f630146c;p=collectd.git diff --git a/src/collectd.c b/src/collectd.c index c9ae66dd..4e521f9f 100644 --- a/src/collectd.c +++ b/src/collectd.c @@ -30,6 +30,10 @@ #include "plugin.h" #include "configfile.h" +#if HAVE_STATGRAB_H +# include +#endif + /* * Global variables */ @@ -87,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); } @@ -215,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" @@ -288,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) { @@ -404,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) */