From: Willy Tarreau Date: Wed, 17 Jun 2020 18:44:28 +0000 (+0200) Subject: MINOR: activity: group the per-loop counters at the top X-Git-Tag: v2.2-dev10~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a00cf9bbafc1566fe2a4311eaffea9b7e2ca9c58;p=thirdparty%2Fhaproxy.git MINOR: activity: group the per-loop counters at the top empty_rq and long_rq are per-loop so it makes sense to group them together with the loop count. In addition since ctxsw and tasksw apply in the context of these counters, let's move them as well. More precisely the difference between wake_tasks and long_rq should roughly correspond to the number of inter-task messages. Visually it's much easier to spot ratios of wakeup causes now. --- diff --git a/src/cli.c b/src/cli.c index 528f935608..cbc61369fa 100644 --- a/src/cli.c +++ b/src/cli.c @@ -1126,6 +1126,10 @@ static int cli_io_handler_show_activity(struct appctx *appctx) chunk_appendf(&trash, "thread_id: %u (%u..%u)\n", tid + 1, 1, global.nbthread); chunk_appendf(&trash, "date_now: %lu.%06lu\n", (long)now.tv_sec, (long)now.tv_usec); + chunk_appendf(&trash, "ctxsw:"); SHOW_TOT(thr, activity[thr].ctxsw); + chunk_appendf(&trash, "tasksw:"); SHOW_TOT(thr, activity[thr].tasksw); + chunk_appendf(&trash, "empty_rq:"); SHOW_TOT(thr, activity[thr].empty_rq); + chunk_appendf(&trash, "long_rq:"); SHOW_TOT(thr, activity[thr].long_rq); chunk_appendf(&trash, "loops:"); SHOW_TOT(thr, activity[thr].loops); chunk_appendf(&trash, "wake_tasks:"); SHOW_TOT(thr, activity[thr].wake_tasks); chunk_appendf(&trash, "wake_signal:"); SHOW_TOT(thr, activity[thr].wake_signal); @@ -1138,10 +1142,6 @@ static int cli_io_handler_show_activity(struct appctx *appctx) chunk_appendf(&trash, "stream:"); SHOW_TOT(thr, activity[thr].stream); chunk_appendf(&trash, "pool_fail:"); SHOW_TOT(thr, activity[thr].pool_fail); chunk_appendf(&trash, "buf_wait:"); SHOW_TOT(thr, activity[thr].buf_wait); - chunk_appendf(&trash, "empty_rq:"); SHOW_TOT(thr, activity[thr].empty_rq); - chunk_appendf(&trash, "long_rq:"); SHOW_TOT(thr, activity[thr].long_rq); - chunk_appendf(&trash, "ctxsw:"); SHOW_TOT(thr, activity[thr].ctxsw); - chunk_appendf(&trash, "tasksw:"); SHOW_TOT(thr, activity[thr].tasksw); chunk_appendf(&trash, "cpust_ms_tot:"); SHOW_TOT(thr, activity[thr].cpust_total / 2); chunk_appendf(&trash, "cpust_ms_1s:"); SHOW_TOT(thr, read_freq_ctr(&activity[thr].cpust_1s) / 2); chunk_appendf(&trash, "cpust_ms_15s:"); SHOW_TOT(thr, read_freq_ctr_period(&activity[thr].cpust_15s, 15000) / 2);