]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mworker/cli: 'show proc debug' for old workers
authorWilliam Lallemand <wlallemand@haproxy.com>
Thu, 24 Oct 2024 12:47:28 +0000 (14:47 +0200)
committerWilliam Lallemand <wlallemand@haproxy.com>
Thu, 24 Oct 2024 12:47:28 +0000 (14:47 +0200)
Add FD details for old workers in 'show proc debug'.

src/mworker.c

index 5798b0de87a40fc83216f6c098215b1304349338..10f0cb183759846ca0e7a62b3cbd2e0be1962c21 100644 (file)
@@ -658,7 +658,10 @@ static int cli_io_handler_show_proc(struct appctx *appctx)
 
                        if (child->options & PROC_O_LEAVING) {
                                memprintf(&uptime, "%dd%02dh%02dm%02ds", up / 86400, (up % 86400) / 3600, (up % 3600) / 60, (up % 60));
-                               chunk_appendf(&trash, "%-15u %-15s %-15d %-15s %-15s\n", child->pid, "worker", child->reloads, uptime, child->version);
+                               chunk_appendf(&trash, "%-15u %-15s %-15d %-15s %-15s", child->pid, "worker", child->reloads, uptime, child->version);
+                               if (ctx->debug)
+                                       chunk_appendf(&trash, "\t\t %-15d %-15d", child->ipc_fd[0], child->ipc_fd[1]);
+                               chunk_appendf(&trash, "\n");
                                ha_free(&uptime);
                        }
                }