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>