Whamcloud - gitweb
LU-16231 misc: fix stats snapshot_time to use wallclock 20/49220/4
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 11 Oct 2022 09:09:08 +0000 (03:09 -0600)
committerOleg Drokin <green@whamcloud.com>
Sun, 11 Dec 2022 14:41:58 +0000 (14:41 +0000)
commit2e6254c78a4d25dd1e00ee793124de4f00533b9f
treee7e66d82364bfab429ae407102bae2102e14b162
parentbedb797c5de5b86a08a36881d65ed971749b2c15
LU-16231 misc: fix stats snapshot_time to use wallclock

The timestamps reported during stats collection inadvertently changed
from being POSIX epoch timestamps to elapsed-from-boot timestamps.

While some collection tools ignore these timestamps, or only use the
delta between successive reads, having uniform timestaps in stats
files simplifies stats correlation between different servers.

Revert the snapshot_time back to showing wallclock time.

Some "init" times were not initialized when stats were allocated or
cleared, do this for all stats shown by lprocfs_stats_header().

Rename struct osc_device fields from od_ to osc_ to avoid confusion
with struct osd_device. Having two od_stats was especially confusing.

Add a test case to verify snapshot_time, start_time, elapsed_time.

Lustre-change: https://review.whamcloud.com/48821
Lustre-commit: e42efe35eec7b9725f7f4fff86aaee04093366b0

Test-Parameters: testlist=sanity env=ONLY=127a,ONLY_REPEAT=100
Fixes: ea2cd3af7b ("LU-11407 obdclass: add start time to stats files")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I421c3b0301c2566b48c2fc6fe7bb8b54ec48ca5d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49220
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
15 files changed:
lustre/include/lustre_osc.h
lustre/ldlm/ldlm_lib.c
lustre/llite/lproc_llite.c
lustre/mdc/lproc_mdc.c
lustre/mdc/mdc_dev.c
lustre/mdt/mdt_lproc.c
lustre/obdclass/genops.c
lustre/obdclass/lprocfs_jobstats.c
lustre/obdclass/lprocfs_status.c
lustre/obdclass/lprocfs_status_server.c
lustre/osc/lproc_osc.c
lustre/osc/osc_cache.c
lustre/osc/osc_dev.c
lustre/osp/lproc_osp.c
lustre/tests/sanity.sh