From 5db761f70955a84754030819db09326beb97cdf0 Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Thu, 24 Oct 2024 14:47:28 +0200 Subject: [PATCH] MINOR: mworker/cli: 'show proc debug' for old workers Add FD details for old workers in 'show proc debug'. --- src/mworker.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/mworker.c b/src/mworker.c index 5798b0de8..10f0cb183 100644 --- a/src/mworker.c +++ b/src/mworker.c @@ -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); } }