diff --git a/README.md b/README.md index 40793034d..b4ec301d1 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ To build Dynomite in _debug mode_: Usage: dynomite [-?hVdDt] [-v verbosity level] [-o output file] [-c conf file] [-s stats port] [-a stats addr] [-i stats interval] [-p pid file] [-m mbuf size] + [-M max alloc messages] Options: -h, --help : this help @@ -47,7 +48,7 @@ To build Dynomite in _debug mode_: -i, --stats-interval=N : set stats aggregation interval in msec (default: 30000 msec) -p, --pid-file=S : set pid file (default: off) -m, --mbuf-size=N : set size of mbuf chunk in bytes (default: 16384 bytes) - -l, --alloc-msgs=N : set max size of allocated messages buffer (default: 2000000) + -M, --max-msgs=N : set max size of allocated messages buffer (default: 2000000) ## Configuration diff --git a/src/dyn_test.c b/src/dyn_test.c index e519aafda..03cf2c5de 100644 --- a/src/dyn_test.c +++ b/src/dyn_test.c @@ -52,11 +52,11 @@ static struct option long_options[] = { { "stats-addr", required_argument, NULL, 'a' }, { "pid-file", required_argument, NULL, 'p' }, { "mbuf-size", required_argument, NULL, 'm' }, - { "alloc_msgs", required_argument, NULL, 'l' }, + { "max_msgs", required_argument, NULL, 'M' }, { NULL, 0, NULL, 0 } }; -static char short_options[] = "hVtDgv:o:c:s:i:a:p:m:"; +static char short_options[] = "hVtDgv:o:c:s:i:a:p:m:M"; static void @@ -64,7 +64,7 @@ dn_show_usage(void) { log_stderr( "Usage: test [-?hVdDt] [-v verbosity level] [-o output file]" CRLF - " [-c conf file] [-m mbuf size] [-l max alloc messages]" CRLF + " [-c conf file] [-m mbuf size] [-M max alloc messages]" CRLF ""); log_stderr( "Options:" CRLF @@ -76,7 +76,7 @@ dn_show_usage(void) " -o, --output=S : set logging file (default: %s)" CRLF " -c, --conf-file=S : set configuration file (default: %s)" CRLF " -m, --mbuf-size=N : set size of mbuf chunk in bytes (default: %d bytes)" CRLF - " -l, --alloc-msgs=N : set max size of allocated messages buffer (default: %d)" CRLF + " -M, --max-msgs=N : set max size of allocated messages buffer (default: %d)" CRLF "", TEST_LOG_DEFAULT, TEST_LOG_DEFAULT, TEST_LOG_DEFAULT, TEST_LOG_PATH != NULL ? TEST_LOG_PATH : "stderr", @@ -177,7 +177,7 @@ test_get_options(int argc, char **argv, struct instance *nci) nci->mbuf_chunk_size = (size_t)value; break; - case 'l': + case 'M': value = dn_atoi(optarg, strlen(optarg)); if (value <= 0) { log_stderr("test: option -l requires a non-zero number"); @@ -197,7 +197,7 @@ test_get_options(int argc, char **argv, struct instance *nci) break; case 'm': - case 'l': + case 'M': case 'v': case 's': case 'i': diff --git a/src/dynomite.c b/src/dynomite.c index a1dff37ff..00b72671c 100644 --- a/src/dynomite.c +++ b/src/dynomite.c @@ -78,13 +78,13 @@ static struct option long_options[] = { { "stats-addr", required_argument, NULL, 'a' }, { "pid-file", required_argument, NULL, 'p' }, { "mbuf-size", required_argument, NULL, 'm' }, - { "alloc-msgs", required_argument, NULL, 'l' }, + { "max-msgs", required_argument, NULL, 'M' }, { "admin-operation", required_argument, NULL, 'x' }, { "admin-param", required_argument, NULL, 'y' }, { NULL, 0, NULL, 0 } }; -static char short_options[] = "hVtdDgv:o:c:s:i:a:p:m:x:y:"; +static char short_options[] = "hVtdDgv:o:c:s:i:a:p:m:M:x:y"; static rstatus_t dn_daemonize(int dump_core) @@ -221,7 +221,7 @@ dn_show_usage(void) "Usage: dynomite [-?hVdDt] [-v verbosity level] [-o output file]" CRLF " [-c conf file] [-s stats port] [-a stats addr]" CRLF " [-i stats interval] [-p pid file] [-m mbuf size]" CRLF - " [-l max alloc messages]" CRLF + " [-M max alloc messages]" CRLF ""); log_stderr( "Options:" CRLF @@ -240,7 +240,7 @@ dn_show_usage(void) " -i, --stats-interval=N : set stats aggregation interval in msec (default: %d msec)" CRLF " -p, --pid-file=S : set pid file (default: %s)" CRLF " -m, --mbuf-size=N : set size of mbuf chunk in bytes (default: %d bytes)" CRLF - " -l, --alloc-msgs=N : set max size of allocated messages buffer (default: %d)" CRLF + " -M, --max-msgs=N : set max size of allocated messages buffer (default: %d)" CRLF " -x, --admin-operation=N : set size of admin operation (default: %d)" CRLF "", DN_LOG_DEFAULT, DN_LOG_MIN, DN_LOG_MAX, @@ -436,7 +436,7 @@ dn_get_options(int argc, char **argv, struct instance *nci) nci->mbuf_chunk_size = (size_t)value; break; - case 'l': + case 'M': value = dn_atoi(optarg, strlen(optarg)); if (value <= 0) { log_stderr("dynomite: option -l requires a non-zero number"); @@ -444,7 +444,7 @@ dn_get_options(int argc, char **argv, struct instance *nci) } if (value < DN_ALLOC_MSGS_MIN_SIZE || value > DN_ALLOC_MSGS_MAX_SIZE) { - log_stderr("dynomite: allocated messages buffer must be between %zu and" + log_stderr("dynomite: max allocated messages buffer must be between %zu and" " %zu bytes", DN_ALLOC_MSGS_MIN_SIZE, DN_ALLOC_MSGS_MAX_SIZE); return DN_ERROR; } @@ -472,7 +472,7 @@ dn_get_options(int argc, char **argv, struct instance *nci) break; case 'm': - case 'l': + case 'M': case 'v': case 's': case 'i':