-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow custom names in zpool status|iostat -c
This patch updates the "zpool status|iostat -c" command to allow custom column names from the output. If the user's command outputs a line like: name=value then "name" is used for the column name, and "value" is its value. Multiple columns can be specified via multiple lines. Column names and values can have spaces: $ zpool iostat -vc 'echo "vdev path=$VDEV_UPATH"; echo size=$(lsblk -n --nodeps -o size $VDEV_UPATH)' capacity operations bandwidth pool alloc free read write read write vdev path size ---------- ----- ----- ----- ----- ----- ----- --------- ---- mypool 269K 1008M 0 0 130 1.12K mirror 269K 1008M 0 0 130 1.12K sdb - - 0 0 124 574 /dev/sdb 1G sdc - - 0 0 6 574 /dev/sdc 1G ---------- ----- ----- ----- ----- ----- ----- --------- ---- After all the "name=value" lines are read (if any), zpool will take the next line of output (if any) and print it without a column header. This patch also disables the -c option with the latency and request size histograms, since it produced awkward output and made the code harder to maintain.
- Loading branch information
1 parent
100790a
commit 4dfda30
Showing
6 changed files
with
254 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.