From 9c6e07c43fb61c3ee81ac7a08e0b60070b2bc664 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Tue, 14 Apr 2026 16:47:06 +0200 Subject: [PATCH] MINOR: stats: report the number of thread groups in "show info" Since thread groups were enabled by default in 3.3, it has become an important element of diagnostic that we're missing in "show info". Let's add it under "NbThreadGroups". --- include/haproxy/stats-t.h | 1 + src/stats.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/haproxy/stats-t.h b/include/haproxy/stats-t.h index 8323778ce..1078f90f9 100644 --- a/include/haproxy/stats-t.h +++ b/include/haproxy/stats-t.h @@ -340,6 +340,7 @@ enum stat_idx_info { ST_I_INF_WARN_BLOCKED, ST_I_INF_PATTERNS_ADDED, ST_I_INF_PATTERNS_FREED, + ST_I_INF_NBTGROUPS, /* must always be the last one */ ST_I_INF_MAX diff --git a/src/stats.c b/src/stats.c index 4ce6d5e95..09c3b1a08 100644 --- a/src/stats.c +++ b/src/stats.c @@ -174,6 +174,7 @@ const struct stat_col stat_cols_info[ST_I_INF_MAX] = { [ST_I_INF_WARN_BLOCKED] = { .name = "BlockedTrafficWarnings", .alt_name = NULL, .desc = "Total number of warnings issued about traffic being blocked by too slow a task" }, [ST_I_INF_PATTERNS_ADDED] = { .name = "PatternsAdded", .alt_name = "patterns_added_total", .desc = "Total number of patterns added (acl/map entries)" }, [ST_I_INF_PATTERNS_FREED] = { .name = "PatternsFreed", .alt_name = "patterns_freed_total", .desc = "Total number of patterns freed (acl/map entries)" }, + [ST_I_INF_NBTGROUPS] = { .name = "NbThreadGroups", .alt_name = "nb_thread_groups", .desc = "Number of started thread groups (global.thread-groups)" }, }; /* one line of info */ @@ -841,6 +842,7 @@ int stats_fill_info(struct field *line, int len, uint flags) line[ST_I_INF_WARN_BLOCKED] = mkf_u32(0, warn_blocked_issued); line[ST_I_INF_PATTERNS_ADDED] = mkf_u64(0, patterns_added); line[ST_I_INF_PATTERNS_FREED] = mkf_u64(0, patterns_freed); + line[ST_I_INF_NBTGROUPS] = mkf_u32(FO_CONFIG|FS_SERVICE, global.nbtgroups); return 1; }