summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8856d7d)
raw | patch | inline | side by side (parent: 8856d7d)
author | Sebastian Harl <sh@tokkee.org> | |
Sat, 7 Aug 2010 07:48:16 +0000 (09:48 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sat, 7 Aug 2010 07:48:16 +0000 (09:48 +0200) |
src/collectd-flush.c | patch | blob | history |
diff --git a/src/collectd-flush.c b/src/collectd-flush.c
index 7b9326bfac83d0a2d745f1cdf05ffed9cd6c3983..3869991431b96a52d9a075e291fd718f18237935 100644 (file)
--- a/src/collectd-flush.c
+++ b/src/collectd-flush.c
* HÃ¥kon J Dugstad Johnsen <hakon-dugstad.johnsen at telenor.com>
**/
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include "libcollectdclient/client.h"
+
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <unistd.h>
#include <getopt.h>
-#include "libcollectdclient/client.h"
+#define DEFAULT_SOCK LOCALSTATEDIR"/run/"PACKAGE_NAME"-unixsock"
extern char *optarg;
"Available options:\n"
" -s Path to collectd's UNIX socket.\n"
- " Default: /var/run/collectd-unixsock\n"
+ " Default: "DEFAULT_SOCK"\n"
" -p <plugin> Plugin to be flushed.\n"
" -i <id> Flush data identified by <id> only (see below).\n"
" -t <seconds> Flush values older than this value only.\n"
}
int main (int argc, char **argv) {
- char address[1024] = "unix:/var/run/collectd-unixsock";
+ char address[1024] = "unix:"DEFAULT_SOCK;
char *plugin = NULL;
char ident_str[1024] = "";
int timeout = -1;