mirror_zfs/cmd
Matthew Ahrens 2ac90457f5
record ioctl elapsed time in zpool history
Each zfs ioctl that changes on-disk state (e.g. set property, create
snapshot, destroy filesystem) is recorded in the zpool history, and is
printed by `zpool history -i`.

For performance diagnostic purposes, it would be useful to know how long
each of these ioctls took to run.  This commit adds that functionality,
with a new `ZPOOL_HIST_ELAPSED_NS` member of the history nvlist.

Additionally, the time recorded in this history log is currently the
time that the history record is written to disk.  But in many cases (CLI
args logging and ioctl logging), this happens asynchronously,
potentially many seconds after the operation completed.  This commit
changes the timestamp to reflect when the history event was created,
rather than when it was written to disk.

Reviewed-by: Mark Maybee <mmaybee@cray.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
Closes #11440
2021-01-11 09:29:25 -08:00
..
arc_summary arc_summary3: Handle overflowing value width 2020-12-11 10:29:53 -08:00
arcstat FreeBSD: Update usage of py-sysctl 2020-12-10 15:28:31 -08:00
dbufstat dbufstat: Fix warnings with Python 3.8 2020-12-23 15:10:35 -08:00
fsck_zfs Fix typos in cmd/ 2019-08-30 09:43:30 -07:00
mount_zfs mount_zfs: print strerror instead of errno for error reporting 2020-12-09 21:24:59 -08:00
raidz_test Distributed Spare (dRAID) Feature 2020-11-13 13:51:51 -08:00
vdev_id Silence 'make checkbashisms' 2020-08-20 13:45:47 -07:00
zdb Memory leak in zdb:import_checkpointed_state() 2020-12-28 10:05:55 -08:00
zed ZED/zfs-list-cacher.sh: don't exit on ignored event type 2020-12-18 09:34:10 -08:00
zfs Use the correct return type for getopt 2020-12-17 10:19:30 -08:00
zfs_ids_to_path Use the correct return type for getopt 2020-12-17 10:19:30 -08:00
zgenhostid zgenhostid: accept hostid arguments equal to zero. 2020-11-14 17:20:54 -08:00
zhack nvlist leaked in zpool_find_config() 2020-12-28 10:05:31 -08:00
zinject Use abs_top_builddir when referencing libraries 2020-07-10 14:26:32 -07:00
zpool record ioctl elapsed time in zpool history 2021-01-11 09:29:25 -08:00
zpool_influxdb zpool_influxdb: move to libexec dir 2020-11-28 11:15:57 -08:00
zstream Use the correct return type for getopt 2020-12-17 10:19:30 -08:00
zstreamdump Minor zstream redup command fixes 2020-04-10 21:10:09 -07:00
ztest Memory leak in ztest_dmu_objset_own() 2020-12-28 10:05:44 -08:00
zvol_id Replace ZFS on Linux references with OpenZFS 2020-10-08 20:10:13 -07:00
zvol_wait zvol_wait should ignore redacted zvols 2019-11-06 10:51:19 -08:00
Makefile.am Add zpool_influxdb command 2020-10-09 09:29:21 -07:00