From a2e5a73bde2e44a70bc4d1196df870a997c597a4 Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Wed, 16 Aug 2023 17:49:43 -0600 Subject: [PATCH] LU-17005 obdclass: allow jobstats histogram to be disabled Allow the jobstats IO size histogram to be disabled with the "enable_stats_header" tunable parameter. This maintains compatibility with older collectd and other stats-scraping scripts that do not understand these new fields. Default to disabled for EXA6.2.1, since it is new for this release. Test-Parameters: trivial Fixes: fde40ce32c ("LU-16087 lprocfs: add histogram to stats counter") Signed-off-by: Andreas Dilger Change-Id: Ie8bff8ef033f0b6e28c19548b7302d0913ddf905 Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/51966 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Nathaniel Clark --- lustre/obdclass/lprocfs_jobstats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/obdclass/lprocfs_jobstats.c b/lustre/obdclass/lprocfs_jobstats.c index 26b2056..3c078fd 100644 --- a/lustre/obdclass/lprocfs_jobstats.c +++ b/lustre/obdclass/lprocfs_jobstats.c @@ -547,7 +547,7 @@ static int lprocfs_jobstats_seq_show(struct seq_file *p, void *v) /* show obd_histogram */ hist = s->ls_cnt_header[i].lc_hist; - if (hist != NULL) { + if (hist != NULL && obd_enable_stats_header) { bool first = true; int j; -- 1.8.3.1