aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYunchih Chen <yunchih.cat@gmail.com>2018-03-18 20:50:26 +0800
committerYunchih Chen <yunchih.cat@gmail.com>2018-03-18 20:50:53 +0800
commit597453d4b147cb0e07704e1dec455cfc7cebe382 (patch)
tree1f3f5b8f169281726b1be9f00dd4e64542fe0a46
parent355005a6746c9a328e62708f291e7c932bee84d1 (diff)
downloadnfcollect-597453d4b147cb0e07704e1dec455cfc7cebe382.tar
nfcollect-597453d4b147cb0e07704e1dec455cfc7cebe382.tar.gz
nfcollect-597453d4b147cb0e07704e1dec455cfc7cebe382.tar.bz2
nfcollect-597453d4b147cb0e07704e1dec455cfc7cebe382.tar.lz
nfcollect-597453d4b147cb0e07704e1dec455cfc7cebe382.tar.xz
nfcollect-597453d4b147cb0e07704e1dec455cfc7cebe382.tar.zst
nfcollect-597453d4b147cb0e07704e1dec455cfc7cebe382.zip
nfcollect: Add more cmd args
-rw-r--r--bin/nfcollect.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/nfcollect.c b/bin/nfcollect.c
index 82a6914..d4cf994 100644
--- a/bin/nfcollect.c
+++ b/bin/nfcollect.c
@@ -39,9 +39,11 @@ const char *help_text =
"Usage: " PACKAGE " [OPTION]\n"
"\n"
"Options:\n"
+ " -c --compression=<algo> compression algorithm to use (default: no compression)\n"
" -d --storage_dir=<dirname> log files storage directory\n"
" -h --help print this help\n"
" -g --nflog-group=<id> the group id to collect\n"
+ " -p --parallelism=<num> max number of committer thread\n"
" -s --storage_size=<dirsize> log files maximum total size in MiB\n"
" -v --version print version information\n"
"\n";
@@ -66,12 +68,13 @@ int main(int argc, char *argv[]) {
{"storage_dir", required_argument, NULL, 'd'},
{"storage_size", required_argument, NULL, 's'},
{"compression", optional_argument, NULL, 'z'},
+ {"parallelism", optional_argument, NULL, 'p'},
{"help", no_argument, NULL, 'h'},
{"version", no_argument, NULL, 'v'},
{0, 0, 0, 0}};
int opt;
- while ((opt = getopt_long(argc, argv, "c:g:d:s:hv", longopts, NULL)) !=
+ while ((opt = getopt_long(argc, argv, "c:g:d:s:hvp:", longopts, NULL)) !=
-1) {
switch (opt) {
case 'h':
@@ -91,6 +94,9 @@ int main(int argc, char *argv[]) {
case 'g':
nfl_group_id = atoi(optarg);
break;
+ case 'p':
+ max_commit_worker = atoi(optarg);
+ break;
case 's':
storage_size = atoi(optarg);
break;