Skip to content
jc-rs
GitHub

zpool-iostat

--zpool-iostatv1.0.0

Converts `zpool iostat` command output to JSON

LinuxmacOSFreeBSDcommand
$ zpool iostat | jc-rs --zpool-iostat

A real pair

From the reference corpus (generic/zpool-iostat.json). The left pane is the input the fixture ships; the right pane is the corpus's expected JSON. CI compares jc-rs with it field by field under the published differential. Hover a value to see where it came from.

zpool iostatgeneric
              capacity     operations     bandwidth
pool        alloc   free   read  write   read  write
----------  -----  -----  -----  -----  -----  -----
zhgstera6   2.89T  2.20T      0      2   349K   448K
zint500      230G  24.0G      0      9   112K   318K
zsam53       211G  24.5G      0      0  14.7K  74.4K
----------  -----  -----  -----  -----  -----  -----
expected outputjson
Use the Left and Right arrow keys to highlight the matching value in the input.
[
  {
    "pool": "zhgstera6",
    "cap_alloc": 2.89,
    "cap_free": 2.2,
    "ops_read": 0,
    "ops_write": 2,
    "bw_read": 349.0,
    "bw_write": 448.0,
    "cap_alloc_unit": "T",
    "cap_free_unit": "T",
    "bw_read_unit": "K",
    "bw_write_unit": "K"
  },
  {
    "pool": "zint500",
    "cap_alloc": 230.0,
    "cap_free": 24.0,
    "ops_read": 0,
    "ops_write": 9,
    "bw_read": 112.0,
    "bw_write": 318.0,
    "cap_alloc_unit": "G",
    "cap_free_unit": "G",
    "bw_read_unit": "K",
    "bw_write_unit": "K"
  },
  {
    "pool": "zsam53",
    "cap_alloc": 211.0,
    "cap_free": 24.5,
    "ops_read": 0,
    "ops_write": 0,
    "bw_read": 14.7,
    "bw_write": 74.4,
    "cap_alloc_unit": "G",
    "cap_free_unit": "G",
    "bw_read_unit": "K",
    "bw_write_unit": "K"
  }
]

Fixture coverage

2/2oracle-valid pairs match under the published structural JSON comparison

Magic syntax

jc-rs zpool iostatjc-rs runs the command itself and parses what it prints. Recognised for: `zpool iostat`

Source: crates/jc-rs-parsers/src/misc/zpool_iostat.rs. jc-rs targets the schemas defined by the original Python tool. Fixture coverage above is the measured evidence for this parser; test the inputs your pipeline depends on. Compare