]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: cli: show the number of reload in 'show proc'
authorWilliam Lallemand <wlallemand@haproxy.com>
Tue, 6 Nov 2018 16:37:10 +0000 (17:37 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 6 Nov 2018 17:28:33 +0000 (18:28 +0100)
Displays the number of reload in the life of each worker.

src/cli.c

index 510e1e3496587602d961dd434484a80482741c3b..999e4c09aa67680225961c5f1be052e9cfb675f5 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -1402,12 +1402,12 @@ static int cli_io_handler_show_proc(struct appctx *appctx)
 
        chunk_reset(&trash);
 
-       chunk_printf(&trash, "# <PID> <type> <relative PID>\n");
-       chunk_appendf(&trash, "%u %s %u\n", getpid(), "master", 0);
+       chunk_printf(&trash, "# <PID> <type> <relative PID> <reloads>\n");
+       chunk_appendf(&trash, "%u %s %u %d\n", getpid(), "master", 0, -1);
 
 
        list_for_each_entry(child, &proc_list, list) {
-               chunk_appendf(&trash, "%u %s %u\n", child->pid, "worker", child->relative_pid);
+               chunk_appendf(&trash, "%u %s %u %d\n", child->pid, "worker", child->relative_pid, child->reloads);
        }
 
        if (ci_putchk(si_ic(si), &trash) == -1) {