diff --git a/include/types/activity.h b/include/types/activity.h index 2a6f5bd6a..618785da8 100644 --- a/include/types/activity.h +++ b/include/types/activity.h @@ -54,6 +54,12 @@ struct activity { unsigned int accepted; // accepted incoming connections unsigned int accq_pushed; // accept queue connections pushed unsigned int accq_full; // accept queue connection not pushed because full +#if defined(DEBUG_DEV) + /* keep these ones at the end */ + unsigned int ctr0; // general purposee debug counter + unsigned int ctr1; // general purposee debug counter + unsigned int ctr2; // general purposee debug counter +#endif char __pad[0]; // unused except to check remaining room char __end[0] __attribute__((aligned(64))); // align size to 64. }; diff --git a/src/cli.c b/src/cli.c index 118f8fd4c..39e246ebd 100644 --- a/src/cli.c +++ b/src/cli.c @@ -1096,6 +1096,12 @@ static int cli_io_handler_show_activity(struct appctx *appctx) 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); #endif +#if defined(DEBUG_DEV) + /* keep these ones at the end */ + chunk_appendf(&trash, "\nctr0:"); for (thr = 0; thr < global.nbthread; thr++) chunk_appendf(&trash, " %u", activity[thr].ctr0); + chunk_appendf(&trash, "\nctr1:"); for (thr = 0; thr < global.nbthread; thr++) chunk_appendf(&trash, " %u", activity[thr].ctr1); + chunk_appendf(&trash, "\nctr2:"); for (thr = 0; thr < global.nbthread; thr++) chunk_appendf(&trash, " %u", activity[thr].ctr2); +#endif chunk_appendf(&trash, "\n"); if (ci_putchk(si_ic(si), &trash) == -1) {