summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a6599f3)
raw | patch | inline | side by side (parent: a6599f3)
author | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Thu, 19 Aug 2010 12:34:43 +0000 (14:34 +0200) | ||
committer | Florian Forster <octo@leeloo.lan.home.verplant.org> | |
Thu, 19 Aug 2010 12:34:43 +0000 (14:34 +0200) |
src/collectd-tg.c | patch | blob | history |
diff --git a/src/collectd-tg.c b/src/collectd-tg.c
index 4df14ffb6e3be225fbab558343270416d676ace3..e5b2d1f14e93e14ca6e677e7a205872b33bb4ac6 100644 (file)
--- a/src/collectd-tg.c
+++ b/src/collectd-tg.c
#include "libcollectdclient/collectd/network.h"
#include "libcollectdclient/collectd/network_buffer.h"
-#define DEF_NUM_HOSTS 1000
-#define DEF_NUM_PLUGINS 20
+#define DEF_NUM_HOSTS 1000
+#define DEF_NUM_PLUGINS 20
#define DEF_NUM_VALUES 100000
+#define DEF_INTERVAL 10
static int conf_num_hosts = DEF_NUM_HOSTS;
static int conf_num_plugins = DEF_NUM_PLUGINS;
static int conf_num_values = DEF_NUM_VALUES;
+static int conf_interval = DEF_INTERVAL;
static const char *conf_destination = NET_DEFAULT_V6_ADDR;
static const char *conf_service = NET_DEFAULT_PORT;
" -n <number> Number of value lists. (Default: %i)\n"
" -H <number> Number of hosts to emulate. (Default: %i)\n"
" -p <number> Number of plugins to emulate. (Default: %i)\n"
+ " -i <seconds> Interval of each value in seconds. (Default: %i)\n"
" -d <dest> Destination address of the network packets.\n"
" (Default: %s)\n"
" -D <port> Destination port of the network packets.\n"
"Copyright (C) 2010 Florian Forster\n"
"Licensed under the GNU General Public License, version 2 (GPLv2)\n",
DEF_NUM_VALUES, DEF_NUM_HOSTS, DEF_NUM_PLUGINS,
+ DEF_INTERVAL,
NET_DEFAULT_V6_ADDR, NET_DEFAULT_PORT);
exit (exit_status);
} /* }}} void exit_usage */
get_integer_opt (optarg, &conf_num_plugins);
break;
+ case 'i':
+ get_integer_opt (optarg, &conf_interval);
+ break;
+
case 'd':
conf_destination = optarg;
break;