MINOR: stats: report tainted on show info
Add a new info field ST_F_TAINTED to dump tainted status at the end of
the 'show info' output.
diff --git a/include/haproxy/stats-t.h b/include/haproxy/stats-t.h
index a9bf25e..4ab1138 100644
--- a/include/haproxy/stats-t.h
+++ b/include/haproxy/stats-t.h
@@ -329,6 +329,7 @@
INF_POOL_ALLOC_BYTES,
INF_POOL_USED_BYTES,
INF_START_TIME_SEC,
+ INF_TAINTED,
/* must always be the last one */
INF_TOTAL_FIELDS
diff --git a/src/stats.c b/src/stats.c
index d6d3129..9862fdd 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -153,6 +153,7 @@
[INF_DEBUG_COMMANDS_ISSUED] = { .name = "DebugCommandsIssued", .desc = "Number of debug commands issued on this process (anything > 0 is unsafe)" },
[INF_CUM_LOG_MSGS] = { .name = "CumRecvLogs", .desc = "Total number of log messages received by log-forwarding listeners on this worker process since started" },
[INF_BUILD_INFO] = { .name = "Build info", .desc = "Build info" },
+ [INF_TAINTED] = { .name = "Tainted", .desc = "Experimental features used" },
};
const struct name_desc stat_fields[ST_F_TOTAL_FIELDS] = {
@@ -4385,6 +4386,10 @@
info[INF_BYTES_OUT_RATE] = mkf_u64(FN_RATE, (unsigned long long)read_freq_ctr(&global.out_32bps) * 32);
info[INF_DEBUG_COMMANDS_ISSUED] = mkf_u32(0, debug_commands_issued);
info[INF_CUM_LOG_MSGS] = mkf_u32(FN_COUNTER, cum_log_messages);
+
+ info[INF_TAINTED] = mkf_str(FO_STATUS, chunk_newstr(out));
+ chunk_appendf(out, "%#x", get_tainted());
+
return 1;
}