diff --git a/src/activity.c b/src/activity.c index d058cfd74..2080fd6dd 100644 --- a/src/activity.c +++ b/src/activity.c @@ -833,9 +833,9 @@ INITCALL1(STG_REGISTER, cfg_register_keywords, &cfg_kws); /* register cli keywords */ static struct cli_kw_list cli_kws = {{ },{ - { { "show", "profiling", NULL }, "show profiling : show CPU profiling options", cli_parse_show_profiling, cli_io_handler_show_profiling, NULL }, - { { "show", "tasks", NULL }, "show tasks : show running tasks", NULL, cli_io_handler_show_tasks, NULL }, - { { "set", "profiling", NULL }, "set profiling : enable/disable resource profiling", cli_parse_set_profiling, NULL }, + { { "set", "profiling", NULL }, "set profiling {auto|on|off} : enable/disable resource profiling (tasks,memory)", cli_parse_set_profiling, NULL }, + { { "show", "profiling", NULL }, "show profiling [] [] : show profiling state (all,status,tasks,memory)", cli_parse_show_profiling, cli_io_handler_show_profiling, NULL }, + { { "show", "tasks", NULL }, "show tasks : show running tasks", NULL, cli_io_handler_show_tasks, NULL }, {{},} }}; diff --git a/src/cache.c b/src/cache.c index b9080d4a8..a95abe5d4 100644 --- a/src/cache.c +++ b/src/cache.c @@ -2666,7 +2666,7 @@ static struct flt_kw_list filter_kws = { "CACHE", { }, { INITCALL1(STG_REGISTER, flt_register_keywords, &filter_kws); static struct cli_kw_list cli_kws = {{},{ - { { "show", "cache", NULL }, "show cache : show cache status", cli_parse_show_cache, cli_io_handler_show_cache, NULL, NULL }, + { { "show", "cache", NULL }, "show cache : show cache status", cli_parse_show_cache, cli_io_handler_show_cache, NULL, NULL }, {{},} }}; diff --git a/src/cli.c b/src/cli.c index b60a030c0..4d9624be3 100644 --- a/src/cli.c +++ b/src/cli.c @@ -254,9 +254,9 @@ static char *cli_gen_usage_msg(struct appctx *appctx, char * const *args) /* always show the prompt/help/quit commands */ chunk_strcat(tmp, - " help : full commands list\n" - " prompt : toggle interactive mode with prompt\n" - " quit : disconnect\n"); + " help : full commands list\n" + " prompt : toggle interactive mode with prompt\n" + " quit : disconnect\n"); chunk_init(&out, NULL, 0); chunk_dup(&out, tmp); @@ -2943,23 +2943,23 @@ static struct applet mcli_applet = { /* register cli keywords */ static struct cli_kw_list cli_kws = {{ },{ - { { "help", NULL }, NULL, cli_parse_simple, NULL, NULL, NULL, ACCESS_MASTER }, - { { "prompt", NULL }, NULL, cli_parse_simple, NULL, NULL, NULL, ACCESS_MASTER }, - { { "quit", NULL }, NULL, cli_parse_simple, NULL, NULL, NULL, ACCESS_MASTER }, - { { "set", "maxconn", "global", NULL }, "set maxconn global : change the per-process maxconn setting", cli_parse_set_maxconn_global, NULL }, - { { "set", "rate-limit", NULL }, "set rate-limit : change a rate limiting value", cli_parse_set_ratelimit, NULL }, - { { "set", "severity-output", NULL }, "set severity-output [none|number|string] : set presence of severity level in feedback information", cli_parse_set_severity_output, NULL, NULL }, - { { "set", "timeout", NULL }, "set timeout : change a timeout setting", cli_parse_set_timeout, NULL, NULL }, - { { "show", "env", NULL }, "show env [var] : dump environment variables known to the process", cli_parse_show_env, cli_io_handler_show_env, NULL }, - { { "show", "cli", "sockets", NULL }, "show cli sockets : dump list of cli sockets", cli_parse_default, cli_io_handler_show_cli_sock, NULL, NULL, ACCESS_MASTER }, - { { "show", "cli", "level", NULL }, "show cli level : display the level of the current CLI session", cli_parse_show_lvl, NULL, NULL, NULL, ACCESS_MASTER}, - { { "show", "fd", NULL }, "show fd [num] : dump list of file descriptors in use", cli_parse_show_fd, cli_io_handler_show_fd, NULL }, - { { "show", "activity", NULL }, "show activity : show per-thread activity stats (for support/developers)", cli_parse_default, cli_io_handler_show_activity, NULL }, - { { "operator", NULL }, "operator : lower the level of the current CLI session to operator", cli_parse_set_lvl, NULL, NULL, NULL, ACCESS_MASTER}, - { { "user", NULL }, "user : lower the level of the current CLI session to user", cli_parse_set_lvl, NULL, NULL, NULL, ACCESS_MASTER}, - { { "_getsocks", NULL }, NULL, _getsocks, NULL }, - { { "expert-mode", NULL }, NULL, cli_parse_expert_experimental_mode, NULL }, // not listed - { { "experimental-mode", NULL }, NULL, cli_parse_expert_experimental_mode, NULL }, // not listed + { { "help", NULL }, NULL, cli_parse_simple, NULL, NULL, NULL, ACCESS_MASTER }, + { { "prompt", NULL }, NULL, cli_parse_simple, NULL, NULL, NULL, ACCESS_MASTER }, + { { "quit", NULL }, NULL, cli_parse_simple, NULL, NULL, NULL, ACCESS_MASTER }, + { { "_getsocks", NULL }, NULL, _getsocks, NULL }, + { { "expert-mode", NULL }, NULL, cli_parse_expert_experimental_mode, NULL }, // not listed + { { "experimental-mode", NULL }, NULL, cli_parse_expert_experimental_mode, NULL }, // not listed + { { "set", "maxconn", "global", NULL }, "set maxconn global : change the per-process maxconn setting", cli_parse_set_maxconn_global, NULL }, + { { "set", "rate-limit", NULL }, "set rate-limit : change a rate limiting value", cli_parse_set_ratelimit, NULL }, + { { "set", "severity-output", NULL }, "set severity-output [none|number|string]: set presence of severity level in feedback information", cli_parse_set_severity_output, NULL, NULL }, + { { "set", "timeout", NULL }, "set timeout [cli] : change a timeout setting", cli_parse_set_timeout, NULL, NULL }, + { { "show", "env", NULL }, "show env [var] : dump environment variables known to the process", cli_parse_show_env, cli_io_handler_show_env, NULL }, + { { "show", "cli", "sockets", NULL }, "show cli sockets : dump list of cli sockets", cli_parse_default, cli_io_handler_show_cli_sock, NULL, NULL, ACCESS_MASTER }, + { { "show", "cli", "level", NULL }, "show cli level : display the level of the current CLI session", cli_parse_show_lvl, NULL, NULL, NULL, ACCESS_MASTER}, + { { "show", "fd", NULL }, "show fd [num] : dump list of file descriptors in use or a specific one", cli_parse_show_fd, cli_io_handler_show_fd, NULL }, + { { "show", "activity", NULL }, "show activity : show per-thread activity stats (for support/developers)", cli_parse_default, cli_io_handler_show_activity, NULL }, + { { "operator", NULL }, "operator : lower the level of the current CLI session to operator", cli_parse_set_lvl, NULL, NULL, NULL, ACCESS_MASTER}, + { { "user", NULL }, "user : lower the level of the current CLI session to user", cli_parse_set_lvl, NULL, NULL, NULL, ACCESS_MASTER}, {{},} }}; diff --git a/src/debug.c b/src/debug.c index f53f1fa3f..0720e1f92 100644 --- a/src/debug.c +++ b/src/debug.c @@ -1181,26 +1181,26 @@ REGISTER_PER_THREAD_INIT(init_debug_per_thread); /* register cli keywords */ static struct cli_kw_list cli_kws = {{ },{ - {{ "debug", "dev", "bug", NULL }, "debug dev bug : call BUG_ON()", debug_parse_cli_bug, NULL, NULL, NULL, ACCESS_EXPERT }, - {{ "debug", "dev", "close", NULL }, "debug dev close : close this file descriptor", debug_parse_cli_close, NULL, NULL, NULL, ACCESS_EXPERT }, - {{ "debug", "dev", "delay", NULL }, "debug dev delay [ms] : sleep this long", debug_parse_cli_delay, NULL, NULL, NULL, ACCESS_EXPERT }, + {{ "debug", "dev", "bug", NULL }, "debug dev bug : call BUG_ON() and crash", debug_parse_cli_bug, NULL, NULL, NULL, ACCESS_EXPERT }, + {{ "debug", "dev", "close", NULL }, "debug dev close : close this file descriptor", debug_parse_cli_close, NULL, NULL, NULL, ACCESS_EXPERT }, + {{ "debug", "dev", "delay", NULL }, "debug dev delay [ms] : sleep this long", debug_parse_cli_delay, NULL, NULL, NULL, ACCESS_EXPERT }, #if defined(DEBUG_DEV) - {{ "debug", "dev", "exec", NULL }, "debug dev exec [cmd] ... : show this command's output", debug_parse_cli_exec, NULL, NULL, NULL, ACCESS_EXPERT }, + {{ "debug", "dev", "exec", NULL }, "debug dev exec [cmd] ... : show this command's output", debug_parse_cli_exec, NULL, NULL, NULL, ACCESS_EXPERT }, #endif - {{ "debug", "dev", "exit", NULL }, "debug dev exit [code] : immediately exit the process", debug_parse_cli_exit, NULL, NULL, NULL, ACCESS_EXPERT }, - {{ "debug", "dev", "hex", NULL }, "debug dev hex [len]: dump a memory area", debug_parse_cli_hex, NULL, NULL, NULL, ACCESS_EXPERT }, - {{ "debug", "dev", "log", NULL }, "debug dev log [msg] ... : send this msg to global logs", debug_parse_cli_log, NULL, NULL, NULL, ACCESS_EXPERT }, - {{ "debug", "dev", "loop", NULL }, "debug dev loop [ms] : loop this long", debug_parse_cli_loop, NULL, NULL, NULL, ACCESS_EXPERT }, + {{ "debug", "dev", "exit", NULL }, "debug dev exit [code] : immediately exit the process", debug_parse_cli_exit, NULL, NULL, NULL, ACCESS_EXPERT }, + {{ "debug", "dev", "hex", NULL }, "debug dev hex [len] : dump a memory area", debug_parse_cli_hex, NULL, NULL, NULL, ACCESS_EXPERT }, + {{ "debug", "dev", "log", NULL }, "debug dev log [msg] ... : send this msg to global logs", debug_parse_cli_log, NULL, NULL, NULL, ACCESS_EXPERT }, + {{ "debug", "dev", "loop", NULL }, "debug dev loop [ms] : loop this long", debug_parse_cli_loop, NULL, NULL, NULL, ACCESS_EXPERT }, #if defined(DEBUG_MEM_STATS) - {{ "debug", "dev", "memstats", NULL }, "debug dev memstats [reset|all] : dump/reset memory statistics", debug_parse_cli_memstats, debug_iohandler_memstats, NULL, NULL, ACCESS_EXPERT }, + {{ "debug", "dev", "memstats", NULL }, "debug dev memstats [reset|all] : dump/reset memory statistics", debug_parse_cli_memstats, debug_iohandler_memstats, NULL, NULL, ACCESS_EXPERT }, #endif - {{ "debug", "dev", "panic", NULL }, "debug dev panic : immediately trigger a panic", debug_parse_cli_panic, NULL, NULL, NULL, ACCESS_EXPERT }, - {{ "debug", "dev", "sched", NULL }, "debug dev sched ... : stress the scheduler", debug_parse_cli_sched, NULL, NULL, NULL, ACCESS_EXPERT }, - {{ "debug", "dev", "stream",NULL }, "debug dev stream ... : show/manipulate stream flags", debug_parse_cli_stream,NULL, NULL, NULL, ACCESS_EXPERT }, - {{ "debug", "dev", "sym", NULL }, "debug dev sym : resolve symbol address", debug_parse_cli_sym, NULL, NULL, NULL, ACCESS_EXPERT }, - {{ "debug", "dev", "tkill", NULL }, "debug dev tkill [thr] [sig] : send signal to thread", debug_parse_cli_tkill, NULL, NULL, NULL, ACCESS_EXPERT }, - {{ "debug", "dev", "write", NULL }, "debug dev write [size] : write that many bytes", debug_parse_cli_write, NULL, NULL, NULL, ACCESS_EXPERT }, - {{ "show", "threads", NULL, NULL }, "show threads : show some threads debugging information", NULL, cli_io_handler_show_threads, NULL }, + {{ "debug", "dev", "panic", NULL }, "debug dev panic : immediately trigger a panic", debug_parse_cli_panic, NULL, NULL, NULL, ACCESS_EXPERT }, + {{ "debug", "dev", "sched", NULL }, "debug dev sched {task|tasklet} [k=v]* : stress the scheduler", debug_parse_cli_sched, NULL, NULL, NULL, ACCESS_EXPERT }, + {{ "debug", "dev", "stream",NULL }, "debug dev stream [k=v]* : show/manipulate stream flags", debug_parse_cli_stream,NULL, NULL, NULL, ACCESS_EXPERT }, + {{ "debug", "dev", "sym", NULL }, "debug dev sym : resolve symbol address", debug_parse_cli_sym, NULL, NULL, NULL, ACCESS_EXPERT }, + {{ "debug", "dev", "tkill", NULL }, "debug dev tkill [thr] [sig] : send signal to thread", debug_parse_cli_tkill, NULL, NULL, NULL, ACCESS_EXPERT }, + {{ "debug", "dev", "write", NULL }, "debug dev write [size] : write that many bytes in return", debug_parse_cli_write, NULL, NULL, NULL, ACCESS_EXPERT }, + {{ "show", "threads", NULL, NULL }, "show threads : show some threads debugging information", NULL, cli_io_handler_show_threads, NULL }, {{},} }}; diff --git a/src/log.c b/src/log.c index f760bacba..7dabe16f8 100644 --- a/src/log.c +++ b/src/log.c @@ -4175,8 +4175,7 @@ static int cli_parse_show_startup_logs(char **args, char *payload, struct appctx /* register cli keywords */ static struct cli_kw_list cli_kws = {{ },{ - { { "show", "startup-logs", NULL }, - "show startup-logs : report logs emitted during HAProxy startup", cli_parse_show_startup_logs, NULL, NULL }, + { { "show", "startup-logs", NULL }, "show startup-logs : report logs emitted during HAProxy startup", cli_parse_show_startup_logs, NULL, NULL }, {{},} }}; diff --git a/src/map.c b/src/map.c index 5bd108c0a..f1b2be90c 100644 --- a/src/map.c +++ b/src/map.c @@ -1128,21 +1128,21 @@ static int cli_parse_commit_map(char **args, char *payload, struct appctx *appct /* register cli keywords */ static struct cli_kw_list cli_kws = {{ },{ - { { "add", "acl", NULL }, "add acl [@ver] : add acl entry", cli_parse_add_map, NULL }, - { { "clear", "acl", NULL }, "clear acl [@ver] : clear the content of this acl", cli_parse_clear_map, cli_io_handler_clear_map, NULL }, - { { "commit","acl", NULL }, "commit acl @ : commit the ACL at this version", cli_parse_commit_map, cli_io_handler_clear_map, NULL }, - { { "del", "acl", NULL }, "del acl : delete acl entry", cli_parse_del_map, NULL }, - { { "get", "acl", NULL }, "get acl : report the patterns matching a sample for an ACL", cli_parse_get_map, cli_io_handler_map_lookup, cli_release_mlook }, - { { "prepare","acl",NULL }, "prepare acl : prepare a new version for atomic ACL replacement", cli_parse_prepare_map, NULL }, - { { "show", "acl", NULL }, "show acl [@ver] [id] : report available acls or dump an acl's contents", cli_parse_show_map, NULL }, - { { "add", "map", NULL }, "add map [@ver] : add map entry", cli_parse_add_map, NULL }, - { { "clear", "map", NULL }, "clear map [@ver] : clear the content of this map", cli_parse_clear_map, cli_io_handler_clear_map, NULL }, - { { "commit","map", NULL }, "commit map @ : commit the map at this version", cli_parse_commit_map, cli_io_handler_clear_map, NULL }, - { { "del", "map", NULL }, "del map : delete map entry", cli_parse_del_map, NULL }, - { { "get", "map", NULL }, "get map : report the keys and values matching a sample for a map", cli_parse_get_map, cli_io_handler_map_lookup, cli_release_mlook }, - { { "prepare","map",NULL }, "prepare map : prepare a new version for atomic map replacement", cli_parse_prepare_map, NULL }, - { { "set", "map", NULL }, "set map : modify map entry", cli_parse_set_map, NULL }, - { { "show", "map", NULL }, "show map [@ver] [id] : report available maps or dump a map's contents", cli_parse_show_map, NULL }, + { { "add", "acl", NULL }, "add acl [@] : add an acl entry", cli_parse_add_map, NULL }, + { { "clear", "acl", NULL }, "clear acl [@] : clear the contents of this acl", cli_parse_clear_map, cli_io_handler_clear_map, NULL }, + { { "commit","acl", NULL }, "commit acl @ : commit the ACL at this version", cli_parse_commit_map, cli_io_handler_clear_map, NULL }, + { { "del", "acl", NULL }, "del acl [|#] : delete acl entries matching ", cli_parse_del_map, NULL }, + { { "get", "acl", NULL }, "get acl : report the patterns matching a sample for an ACL", cli_parse_get_map, cli_io_handler_map_lookup, cli_release_mlook }, + { { "prepare","acl",NULL }, "prepare acl : prepare a new version for atomic ACL replacement", cli_parse_prepare_map, NULL }, + { { "show", "acl", NULL }, "show acl [@] ] : report available acls or dump an acl's contents", cli_parse_show_map, NULL }, + { { "add", "map", NULL }, "add map [@] : add a map entry (payload supported instead of key/val)", cli_parse_add_map, NULL }, + { { "clear", "map", NULL }, "clear map [@] : clear the contents of this map", cli_parse_clear_map, cli_io_handler_clear_map, NULL }, + { { "commit","map", NULL }, "commit map @ : commit the map at this version", cli_parse_commit_map, cli_io_handler_clear_map, NULL }, + { { "del", "map", NULL }, "del map [|#] : delete map entries matching ", cli_parse_del_map, NULL }, + { { "get", "map", NULL }, "get map : report the keys and values matching a sample for a map", cli_parse_get_map, cli_io_handler_map_lookup, cli_release_mlook }, + { { "prepare","map",NULL }, "prepare map : prepare a new version for atomic map replacement", cli_parse_prepare_map, NULL }, + { { "set", "map", NULL }, "set map [|#] : modify a map entry", cli_parse_set_map, NULL }, + { { "show", "map", NULL }, "show map [@ver] [map] : report available maps or dump a map's contents", cli_parse_show_map, NULL }, { { NULL }, NULL, NULL, NULL } }}; diff --git a/src/peers.c b/src/peers.c index 3b5e8413c..3f8850843 100644 --- a/src/peers.c +++ b/src/peers.c @@ -3700,7 +3700,7 @@ static int cli_io_handler_show_peers(struct appctx *appctx) * CLI keywords. */ static struct cli_kw_list cli_kws = {{ }, { - { { "show", "peers", NULL }, "show peers [peers section]: dump some information about all the peers or this peers section", cli_parse_show_peers, cli_io_handler_show_peers, }, + { { "show", "peers", NULL }, "show peers [dict|-] [section] : dump some information about all the peers or this peers section", cli_parse_show_peers, cli_io_handler_show_peers, }, {}, }}; diff --git a/src/pool.c b/src/pool.c index 3cca6c7a2..55c833a3b 100644 --- a/src/pool.c +++ b/src/pool.c @@ -570,7 +570,7 @@ INITCALL0(STG_PREPARE, init_pools); /* register cli keywords */ static struct cli_kw_list cli_kws = {{ },{ - { { "show", "pools", NULL }, "show pools : report information about the memory pools usage", NULL, cli_io_handler_dump_pools }, + { { "show", "pools", NULL }, "show pools : report information about the memory pools usage", NULL, cli_io_handler_dump_pools }, {{},} }}; diff --git a/src/proxy.c b/src/proxy.c index c209b23ce..442368670 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -3081,17 +3081,17 @@ static int cli_io_handler_show_errors(struct appctx *appctx) /* register cli keywords */ static struct cli_kw_list cli_kws = {{ },{ - { { "disable", "frontend", NULL }, "disable frontend : temporarily disable specific frontend", cli_parse_disable_frontend, NULL, NULL }, - { { "enable", "frontend", NULL }, "enable frontend : re-enable specific frontend", cli_parse_enable_frontend, NULL, NULL }, - { { "set", "maxconn", "frontend", NULL }, "set maxconn frontend : change a frontend's maxconn setting", cli_parse_set_maxconn_frontend, NULL }, - { { "show","servers", "conn", NULL }, "show servers conn [id]: dump server connections status (for backend )", cli_parse_show_servers, cli_io_handler_servers_state }, - { { "show","servers", "state", NULL }, "show servers state [id]: dump volatile server information (for backend )", cli_parse_show_servers, cli_io_handler_servers_state }, - { { "show", "backend", NULL }, "show backend : list backends in the current running config", NULL, cli_io_handler_show_backend }, - { { "shutdown", "frontend", NULL }, "shutdown frontend : stop a specific frontend", cli_parse_shutdown_frontend, NULL, NULL }, - { { "set", "dynamic-cookie-key", "backend", NULL }, "set dynamic-cookie-key backend : change a backend secret key for dynamic cookies", cli_parse_set_dyncookie_key_backend, NULL }, - { { "enable", "dynamic-cookie", "backend", NULL }, "enable dynamic-cookie backend : enable dynamic cookies on a specific backend", cli_parse_enable_dyncookie_backend, NULL }, - { { "disable", "dynamic-cookie", "backend", NULL }, "disable dynamic-cookie backend : disable dynamic cookies on a specific backend", cli_parse_disable_dyncookie_backend, NULL }, - { { "show", "errors", NULL }, "show errors : report last request and response errors for each proxy", cli_parse_show_errors, cli_io_handler_show_errors, NULL }, + { { "disable", "frontend", NULL }, "disable frontend : temporarily disable specific frontend", cli_parse_disable_frontend, NULL, NULL }, + { { "enable", "frontend", NULL }, "enable frontend : re-enable specific frontend", cli_parse_enable_frontend, NULL, NULL }, + { { "set", "maxconn", "frontend", NULL }, "set maxconn frontend : change a frontend's maxconn setting", cli_parse_set_maxconn_frontend, NULL }, + { { "show","servers", "conn", NULL }, "show servers conn [] : dump server connections status (all or for a single backend)", cli_parse_show_servers, cli_io_handler_servers_state }, + { { "show","servers", "state", NULL }, "show servers state [] : dump volatile server information (all or for a single backend)", cli_parse_show_servers, cli_io_handler_servers_state }, + { { "show", "backend", NULL }, "show backend : list backends in the current running config", NULL, cli_io_handler_show_backend }, + { { "shutdown", "frontend", NULL }, "shutdown frontend : stop a specific frontend", cli_parse_shutdown_frontend, NULL, NULL }, + { { "set", "dynamic-cookie-key", "backend", NULL }, "set dynamic-cookie-key backend : change a backend secret key for dynamic cookies", cli_parse_set_dyncookie_key_backend, NULL }, + { { "enable", "dynamic-cookie", "backend", NULL }, "enable dynamic-cookie backend : enable dynamic cookies on a specific backend", cli_parse_enable_dyncookie_backend, NULL }, + { { "disable", "dynamic-cookie", "backend", NULL }, "disable dynamic-cookie backend : disable dynamic cookies on a specific backend", cli_parse_disable_dyncookie_backend, NULL }, + { { "show", "errors", NULL }, "show errors [] [request|response] : report last request and/or response errors for each proxy", cli_parse_show_errors, cli_io_handler_show_errors, NULL }, {{},} }}; diff --git a/src/resolvers.c b/src/resolvers.c index 88e8d7600..2a20931ae 100644 --- a/src/resolvers.c +++ b/src/resolvers.c @@ -2543,8 +2543,7 @@ static int cli_io_handler_dump_resolvers_to_buffer(struct appctx *appctx) /* register cli keywords */ static struct cli_kw_list cli_kws = {{ }, { - { { "show", "resolvers", NULL }, "show resolvers [id]: dumps counters from all resolvers section and\n" - " associated name servers", + { { "show", "resolvers", NULL }, "show resolvers [id] : dumps counters from all resolvers section and associated name servers", cli_parse_stat_resolvers, cli_io_handler_dump_resolvers_to_buffer }, {{},} } diff --git a/src/server.c b/src/server.c index 07e82ada5..9b83ff8fe 100644 --- a/src/server.c +++ b/src/server.c @@ -4595,19 +4595,18 @@ static int cli_parse_delete_server(char **args, char *payload, struct appctx *ap /* register cli keywords */ static struct cli_kw_list cli_kws = {{ },{ - { { "disable", "agent", NULL }, "disable agent : disable agent checks (use 'set server' instead)", cli_parse_disable_agent, NULL }, - { { "disable", "health", NULL }, "disable health : disable health checks (use 'set server' instead)", cli_parse_disable_health, NULL }, - { { "disable", "server", NULL }, "disable server : disable a server for maintenance (use 'set server' instead)", cli_parse_disable_server, NULL }, - { { "enable", "agent", NULL }, "enable agent : enable agent checks (use 'set server' instead)", cli_parse_enable_agent, NULL }, - { { "enable", "health", NULL }, "enable health : enable health checks (use 'set server' instead)", cli_parse_enable_health, NULL }, - { { "enable", "server", NULL }, "enable server : enable a disabled server (use 'set server' instead)", cli_parse_enable_server, NULL }, - { { "set", "maxconn", "server", NULL }, "set maxconn server : change a server's maxconn setting", cli_parse_set_maxconn_server, NULL }, - { { "set", "server", NULL }, "set server : change a server's state, weight, address or ssl", cli_parse_set_server }, - { { "get", "weight", NULL }, "get weight : report a server's current weight", cli_parse_get_weight }, - { { "set", "weight", NULL }, "set weight : change a server's weight (deprecated)", cli_parse_set_weight }, - { { "add", "server", NULL }, "add server : create a new server (EXPERIMENTAL)", cli_parse_add_server, NULL, NULL, NULL, ACCESS_EXPERIMENTAL }, - { { "del", "server", NULL }, "del server : remove a dynamically added server (EXPERIMENTAL)", cli_parse_delete_server, NULL, NULL, NULL, ACCESS_EXPERIMENTAL }, - + { { "disable", "agent", NULL }, "disable agent (DEPRECATED) : disable agent checks (use 'set server' instead)", cli_parse_disable_agent, NULL }, + { { "disable", "health", NULL }, "disable health (DEPRECATED) : disable health checks (use 'set server' instead)", cli_parse_disable_health, NULL }, + { { "disable", "server", NULL }, "disable server (DEPRECATED) : disable a server for maintenance (use 'set server' instead)", cli_parse_disable_server, NULL }, + { { "enable", "agent", NULL }, "enable agent (DEPRECATED) : enable agent checks (use 'set server' instead)", cli_parse_enable_agent, NULL }, + { { "enable", "health", NULL }, "enable health (DEPRECATED) : enable health checks (use 'set server' instead)", cli_parse_enable_health, NULL }, + { { "enable", "server", NULL }, "enable server (DEPRECATED) : enable a disabled server (use 'set server' instead)", cli_parse_enable_server, NULL }, + { { "set", "maxconn", "server", NULL }, "set maxconn server / : change a server's maxconn setting", cli_parse_set_maxconn_server, NULL }, + { { "set", "server", NULL }, "set server / [opts] : change a server's state, weight, address or ssl", cli_parse_set_server }, + { { "get", "weight", NULL }, "get weight / : report a server's current weight", cli_parse_get_weight }, + { { "set", "weight", NULL }, "set weight / (DEPRECATED) : change a server's weight (use 'set server' instead)", cli_parse_set_weight }, + { { "add", "server", NULL }, "add server / : create a new server (EXPERIMENTAL)", cli_parse_add_server, NULL, NULL, NULL, ACCESS_EXPERIMENTAL }, + { { "del", "server", NULL }, "del server / : remove a dynamically added server (EXPERIMENTAL)", cli_parse_delete_server, NULL, NULL, NULL, ACCESS_EXPERIMENTAL }, {{},} }}; diff --git a/src/sink.c b/src/sink.c index 5605c2b23..159c2363e 100644 --- a/src/sink.c +++ b/src/sink.c @@ -1267,7 +1267,7 @@ INITCALL0(STG_REGISTER, sink_init); REGISTER_POST_DEINIT(sink_deinit); static struct cli_kw_list cli_kws = {{ },{ - { { "show", "events", NULL }, "show events [] : show event sink state", cli_parse_show_events, NULL, NULL }, + { { "show", "events", NULL }, "show events [] [-w] [-n] : show event sink state", cli_parse_show_events, NULL, NULL }, {{},} }}; diff --git a/src/ssl_ckch.c b/src/ssl_ckch.c index a6f18bd7b..6931d196d 100644 --- a/src/ssl_ckch.c +++ b/src/ssl_ckch.c @@ -1859,12 +1859,12 @@ void ckch_deinit() /* register cli keywords */ static struct cli_kw_list cli_kws = {{ },{ - { { "new", "ssl", "cert", NULL }, "new ssl cert : create a new certificate file to be used in a crt-list or a directory", cli_parse_new_cert, NULL, NULL }, - { { "set", "ssl", "cert", NULL }, "set ssl cert : replace a certificate file", cli_parse_set_cert, NULL, NULL }, - { { "commit", "ssl", "cert", NULL }, "commit ssl cert : commit a certificate file", cli_parse_commit_cert, cli_io_handler_commit_cert, cli_release_commit_cert }, - { { "abort", "ssl", "cert", NULL }, "abort ssl cert : abort a transaction for a certificate file", cli_parse_abort_cert, NULL, NULL }, - { { "del", "ssl", "cert", NULL }, "del ssl cert : delete an unused certificate file", cli_parse_del_cert, NULL, NULL }, - { { "show", "ssl", "cert", NULL }, "show ssl cert [] : display the SSL certificates used in memory, or the details of a ", cli_parse_show_cert, cli_io_handler_show_cert, cli_release_show_cert }, + { { "new", "ssl", "cert", NULL }, "new ssl cert : create a new certificate file to be used in a crt-list or a directory", cli_parse_new_cert, NULL, NULL }, + { { "set", "ssl", "cert", NULL }, "set ssl cert : replace a certificate file", cli_parse_set_cert, NULL, NULL }, + { { "commit", "ssl", "cert", NULL }, "commit ssl cert : commit a certificate file", cli_parse_commit_cert, cli_io_handler_commit_cert, cli_release_commit_cert }, + { { "abort", "ssl", "cert", NULL }, "abort ssl cert : abort a transaction for a certificate file", cli_parse_abort_cert, NULL, NULL }, + { { "del", "ssl", "cert", NULL }, "del ssl cert : delete an unused certificate file", cli_parse_del_cert, NULL, NULL }, + { { "show", "ssl", "cert", NULL }, "show ssl cert [] : display the SSL certificates used in memory, or the details of a file", cli_parse_show_cert, cli_io_handler_show_cert, cli_release_show_cert }, { { NULL }, NULL, NULL, NULL } }}; diff --git a/src/ssl_crtlist.c b/src/ssl_crtlist.c index f8f536095..f4f26ed8f 100644 --- a/src/ssl_crtlist.c +++ b/src/ssl_crtlist.c @@ -1454,9 +1454,9 @@ void crtlist_deinit() /* register cli keywords */ static struct cli_kw_list cli_kws = {{ },{ - { { "add", "ssl", "crt-list", NULL }, "add ssl crt-list [options] : add a line to a crt-list ", cli_parse_add_crtlist, cli_io_handler_add_crtlist, cli_release_add_crtlist }, - { { "del", "ssl", "crt-list", NULL }, "del ssl crt-list : delete a line in a crt-list ", cli_parse_del_crtlist, NULL, NULL }, - { { "show", "ssl", "crt-list", NULL }, "show ssl crt-list [-n] [] : show the list of crt-lists or the content of a crt-list ", cli_parse_dump_crtlist, cli_io_handler_dump_crtlist, NULL }, + { { "add", "ssl", "crt-list", NULL }, "add ssl crt-list [opts]* : add to crt-list file a line or a payload", cli_parse_add_crtlist, cli_io_handler_add_crtlist, cli_release_add_crtlist }, + { { "del", "ssl", "crt-list", NULL }, "del ssl crt-list : delete a line from crt-list file ", cli_parse_del_crtlist, NULL, NULL }, + { { "show", "ssl", "crt-list", NULL }, "show ssl crt-list [-n] [] : show the list of crt-lists or the content of a crt-list file ", cli_parse_dump_crtlist, cli_io_handler_dump_crtlist, NULL }, { { NULL }, NULL, NULL, NULL } } }; diff --git a/src/ssl_sock.c b/src/ssl_sock.c index fbf23d5bf..1a2d7be49 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -6938,10 +6938,10 @@ static int cli_parse_set_ocspresponse(char **args, char *payload, struct appctx /* register cli keywords */ static struct cli_kw_list cli_kws = {{ },{ #if (defined SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB && TLS_TICKETS_NO > 0) - { { "show", "tls-keys", NULL }, "show tls-keys [id|*]: show tls keys references or dump tls ticket keys when id specified", cli_parse_show_tlskeys, NULL }, - { { "set", "ssl", "tls-key", NULL }, "set ssl tls-key [id|keyfile] : set the next TLS key for the or listener to ", cli_parse_set_tlskeys, NULL }, + { { "show", "tls-keys", NULL }, "show tls-keys [id|*] : show tls keys references or dump tls ticket keys when id specified", cli_parse_show_tlskeys, NULL }, + { { "set", "ssl", "tls-key", NULL }, "set ssl tls-key [id|file] : set the next TLS key for the or listener to ", cli_parse_set_tlskeys, NULL }, #endif - { { "set", "ssl", "ocsp-response", NULL }, NULL, cli_parse_set_ocspresponse, NULL }, + { { "set", "ssl", "ocsp-response", NULL }, "set ssl ocsp-response : update a certificate's OCSP Response from a base64-encode DER", cli_parse_set_ocspresponse, NULL }, { { NULL }, NULL, NULL, NULL } }}; diff --git a/src/stats.c b/src/stats.c index a2741da12..d6d3129d1 100644 --- a/src/stats.c +++ b/src/stats.c @@ -5095,10 +5095,10 @@ REGISTER_PER_THREAD_FREE(free_trash_counters); /* register cli keywords */ static struct cli_kw_list cli_kws = {{ },{ - { { "clear", "counters", NULL }, "clear counters : clear max statistics counters (add 'all' for all counters)", cli_parse_clear_counters, NULL, NULL }, - { { "show", "info", NULL }, "show info : report information about the running process [desc|json|typed]*", cli_parse_show_info, cli_io_handler_dump_info, NULL }, - { { "show", "stat", NULL }, "show stat : report counters for each proxy and server [desc|json|no-maint|typed|up]*", cli_parse_show_stat, cli_io_handler_dump_stat, NULL }, - { { "show", "schema", "json", NULL }, "show schema json : report schema used for stats", NULL, cli_io_handler_dump_json_schema, NULL }, + { { "clear", "counters", NULL }, "clear counters [all] : clear max statistics counters (or all counters)", cli_parse_clear_counters, NULL, NULL }, + { { "show", "info", NULL }, "show info [desc|json|typed]* : report information about the running process", cli_parse_show_info, cli_io_handler_dump_info, NULL }, + { { "show", "stat", NULL }, "show stat [desc|json|no-maint|typed|up]*: report counters for each proxy and server", cli_parse_show_stat, cli_io_handler_dump_stat, NULL }, + { { "show", "schema", "json", NULL }, "show schema json : report schema used for stats", NULL, cli_io_handler_dump_json_schema, NULL }, {{},} }}; diff --git a/src/stick_table.c b/src/stick_table.c index 1fe60a00c..8c9aebf88 100644 --- a/src/stick_table.c +++ b/src/stick_table.c @@ -4059,9 +4059,9 @@ INITCALL0(STG_INIT, stkt_late_init); /* register cli keywords */ static struct cli_kw_list cli_kws = {{ },{ - { { "clear", "table", NULL }, "clear table : remove an entry from a table", cli_parse_table_req, cli_io_handler_table, cli_release_show_table, (void *)STK_CLI_ACT_CLR }, - { { "set", "table", NULL }, "set table [id] : update or create a table entry's data", cli_parse_table_req, cli_io_handler_table, NULL, (void *)STK_CLI_ACT_SET }, - { { "show", "table", NULL }, "show table [id]: report table usage stats or dump this table's contents", cli_parse_table_req, cli_io_handler_table, cli_release_show_table, (void *)STK_CLI_ACT_SHOW }, + { { "clear", "table", NULL }, "clear table []* : remove an entry from a table (filter: data/key)", cli_parse_table_req, cli_io_handler_table, cli_release_show_table, (void *)STK_CLI_ACT_CLR }, + { { "set", "table", NULL }, "set table
key [data.* ]* : update or create a table entry's data", cli_parse_table_req, cli_io_handler_table, NULL, (void *)STK_CLI_ACT_SET }, + { { "show", "table", NULL }, "show table
[]* : report table usage stats or dump this table's contents (filter: data/key)", cli_parse_table_req, cli_io_handler_table, cli_release_show_table, (void *)STK_CLI_ACT_SHOW }, {{},} }}; diff --git a/src/stream.c b/src/stream.c index 99552c44d..bff951ec5 100644 --- a/src/stream.c +++ b/src/stream.c @@ -3692,9 +3692,9 @@ static int cli_parse_shutdown_sessions_server(char **args, char *payload, struct /* register cli keywords */ static struct cli_kw_list cli_kws = {{ },{ - { { "show", "sess", NULL }, "show sess [id] : report the list of current sessions or dump this session", cli_parse_show_sess, cli_io_handler_dump_sess, cli_release_show_sess }, - { { "shutdown", "session", NULL }, "shutdown session : kill a specific session", cli_parse_shutdown_session, NULL, NULL }, - { { "shutdown", "sessions", "server" }, "shutdown sessions server : kill sessions on a server", cli_parse_shutdown_sessions_server, NULL, NULL }, + { { "show", "sess", NULL }, "show sess [id] : report the list of current sessions or dump this exact session", cli_parse_show_sess, cli_io_handler_dump_sess, cli_release_show_sess }, + { { "shutdown", "session", NULL }, "shutdown session [id] : kill a specific session", cli_parse_shutdown_session, NULL, NULL }, + { { "shutdown", "sessions", "server" }, "shutdown sessions server / : kill sessions on a server", cli_parse_shutdown_sessions_server, NULL, NULL }, {{},} }}; diff --git a/src/trace.c b/src/trace.c index 179168e16..f075787f3 100644 --- a/src/trace.c +++ b/src/trace.c @@ -674,8 +674,8 @@ static int cli_parse_show_trace(char **args, char *payload, struct appctx *appct } static struct cli_kw_list cli_kws = {{ },{ - { { "trace", NULL }, "trace [cmd [args...]] : manage live tracing", cli_parse_trace, NULL, NULL }, - { { "show", "trace", NULL }, "show trace [] : show live tracing state", cli_parse_show_trace, NULL, NULL }, + { { "trace", NULL }, "trace [|0] [cmd [args...]] : manage live tracing (empty to list, 0 to stop all)", cli_parse_trace, NULL, NULL }, + { { "show", "trace", NULL }, "show trace [] : show live tracing state", cli_parse_show_trace, NULL, NULL }, {{},} }}; diff --git a/src/vars.c b/src/vars.c index 03aade21f..90acbfc4a 100644 --- a/src/vars.c +++ b/src/vars.c @@ -1127,8 +1127,8 @@ INITCALL1(STG_REGISTER, cfg_register_keywords, &cfg_kws); /* register cli keywords */ static struct cli_kw_list cli_kws = {{ },{ - { { "get", "var", NULL }, "get var : retrieve contents of a process-wide variable", vars_parse_cli_get_var, NULL }, - { { "set", "var", NULL }, "set var : set variable from an expression", vars_parse_cli_set_var, NULL, NULL, NULL, ACCESS_EXPERIMENTAL }, + { { "get", "var", NULL }, "get var : retrieve contents of a process-wide variable", vars_parse_cli_get_var, NULL }, + { { "set", "var", NULL }, "set var : set variable from an expression", vars_parse_cli_set_var, NULL, NULL, NULL, ACCESS_EXPERIMENTAL }, { { NULL }, NULL, NULL, NULL } }}; INITCALL1(STG_REGISTER, cli_register_kw, &cli_kws);