Whamcloud - gitweb
LU-16231 misc: fix stats snapshot_time to use wallclock 21/48821/7
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:40:14 +0000 (14:40 +0000)
commite42efe35eec7b9725f7f4fff86aaee04093366b0
tree1041961563547ac38238f4372dffea3a8e50d160
parente96cb6ff1fea7a2bc62a6c0786fb0e07cbfda81a
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.

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/+/48821
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Li Xi <lixi@ddn.com>
Reviewed-by: Ellis Wilson <elliswilson@microsoft.com>
Reviewed-by: Feng Lei <flei@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
16 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_handler.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