]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: cli/activity: report the accept queue sizes in "show activity"
authorWilly Tarreau <w@1wt.eu>
Fri, 12 Apr 2019 13:29:23 +0000 (15:29 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 12 Apr 2019 13:54:15 +0000 (15:54 +0200)
Seeing the size of each ring helps understand which threads are
overloaded and why some of them are less often elected than others
by the multi-queue load balancer.

src/cli.c

index 755a94c133db563a2f09ec2ebd96a8c0c1ab05dc..5db1894faf218f744a9e49a89335f4bd9dcde32b 100644 (file)
--- a/src/cli.c
+++ b/src/cli.c
@@ -1071,6 +1071,7 @@ static int cli_io_handler_show_activity(struct appctx *appctx)
        chunk_appendf(&trash, "\naccepted:");     for (thr = 0; thr < global.nbthread; thr++) chunk_appendf(&trash, " %u", activity[thr].accepted);
        chunk_appendf(&trash, "\naccq_pushed:");  for (thr = 0; thr < global.nbthread; thr++) chunk_appendf(&trash, " %u", activity[thr].accq_pushed);
        chunk_appendf(&trash, "\naccq_full:");    for (thr = 0; thr < global.nbthread; thr++) chunk_appendf(&trash, " %u", activity[thr].accq_full);
+       chunk_appendf(&trash, "\naccq_ring:");    for (thr = 0; thr < global.nbthread; thr++) chunk_appendf(&trash, " %u", (accept_queue_rings[thr].tail - accept_queue_rings[thr].head + ACCEPT_QUEUE_SIZE)%ACCEPT_QUEUE_SIZE);
 
        chunk_appendf(&trash, "\n");