aboutsummaryrefslogtreecommitdiffstats
path: root/include/libzfs.h
diff options
context:
space:
mode:
authorTony Hutter <[email protected]>2017-06-22 09:39:01 -0700
committerBrian Behlendorf <[email protected]>2017-06-22 09:39:01 -0700
commit29eb4942856da942f1482cba9326698f91eb8c1c (patch)
tree53f4fcb43dfce3ecb74b598fa04898c5b4114db8 /include/libzfs.h
parentd9ad3fea3bd0368b6af0b08ccc4de1b080e2bcb7 (diff)
Dashes for zero latency values in zpool iostat -p
This prints dashes instead of zeros for zero latency values in 'zpool iostat -p'. You'll get zero latencies reported when the disk is idle, but technically a zero latency is invalid, since you can't measure the latency of doing nothing. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: George Melikov <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Signed-off-by: Tony Hutter <[email protected]> Closes #6210
Diffstat (limited to 'include/libzfs.h')
-rw-r--r--include/libzfs.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/libzfs.h b/include/libzfs.h
index c634ccd86..62a61406a 100644
--- a/include/libzfs.h
+++ b/include/libzfs.h
@@ -775,11 +775,21 @@ extern int zfs_unshareall(zfs_handle_t *);
extern int zfs_deleg_share_nfs(libzfs_handle_t *, char *, char *, char *,
void *, void *, int, zfs_share_op_t);
+/*
+ * Formats for iostat numbers. Examples: "12K", "30ms", "4B", "2321234", "-".
+ *
+ * ZFS_NICENUM_1024: Print kilo, mega, tera, peta, exa..
+ * ZFS_NICENUM_BYTES: Print single bytes ("13B"), kilo, mega, tera...
+ * ZFS_NICENUM_TIME: Print nanosecs, microsecs, millisecs, seconds...
+ * ZFS_NICENUM_RAW: Print the raw number without any formatting
+ * ZFS_NICENUM_RAWTIME: Same as RAW, but print dashes ('-') for zero.
+ */
enum zfs_nicenum_format {
ZFS_NICENUM_1024 = 0,
ZFS_NICENUM_BYTES = 1,
ZFS_NICENUM_TIME = 2,
- ZFS_NICENUM_RAW = 3
+ ZFS_NICENUM_RAW = 3,
+ ZFS_NICENUM_RAWTIME = 4
};
/*