mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-18 17:34:45 +00:00
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.
This commit is contained in:
parent
f492992065
commit
5dfdf3e5b0
@ -329,6 +329,7 @@ enum info_field {
|
||||
INF_POOL_ALLOC_BYTES,
|
||||
INF_POOL_USED_BYTES,
|
||||
INF_START_TIME_SEC,
|
||||
INF_TAINTED,
|
||||
|
||||
/* must always be the last one */
|
||||
INF_TOTAL_FIELDS
|
||||
|
@ -153,6 +153,7 @@ const struct name_desc info_fields[INF_TOTAL_FIELDS] = {
|
||||
[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 @@ int stats_fill_info(struct field *info, int len)
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user