From: Willy Tarreau Date: Thu, 16 May 2019 14:19:47 +0000 (+0200) Subject: MINOR: cli/activity: show the dumping thread ID starting at 1 X-Git-Tag: v2.0-dev4~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58d9621fc8613d06928a46a9b00ebaa5ef86979f;p=thirdparty%2Fhaproxy.git MINOR: cli/activity: show the dumping thread ID starting at 1 Both the config and gdb report thread IDs starting at 1, so better do the same in "show activity" to limit confusion. We also display the full permitted range. This could be backported to 1.9 since it was present there. --- diff --git a/src/cli.c b/src/cli.c index 3aa5f230bf..23ab57b733 100644 --- a/src/cli.c +++ b/src/cli.c @@ -1068,7 +1068,7 @@ static int cli_io_handler_show_activity(struct appctx *appctx) chunk_reset(&trash); - chunk_appendf(&trash, "thread_id: %u", tid); + chunk_appendf(&trash, "thread_id: %u (%u..%u)", tid + 1, 1, global.nbthread); chunk_appendf(&trash, "\ndate_now: %lu.%06lu", (long)now.tv_sec, (long)now.tv_usec); chunk_appendf(&trash, "\nloops:"); for (thr = 0; thr < global.nbthread; thr++) chunk_appendf(&trash, " %u", activity[thr].loops); chunk_appendf(&trash, "\nwake_cache:"); for (thr = 0; thr < global.nbthread; thr++) chunk_appendf(&trash, " %u", activity[thr].wake_cache);