mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-17 00:07:37 +02:00
doc update
This commit is contained in:
@ -293,6 +293,7 @@ option.
|
|||||||
| `--xrandr` | `xrandr` command parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/xrandr) |
|
| `--xrandr` | `xrandr` command parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/xrandr) |
|
||||||
| `--yaml` | YAML file parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/yaml) |
|
| `--yaml` | YAML file parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/yaml) |
|
||||||
| `--zipinfo` | `zipinfo` command parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/zipinfo) |
|
| `--zipinfo` | `zipinfo` command parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/zipinfo) |
|
||||||
|
| `--zpool-iostat` | `zpool iostat` command parser | [details](https://kellyjonbrazil.github.io/jc/docs/parsers/zpool_iostat) |
|
||||||
|
|
||||||
### Options
|
### Options
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@ _jc()
|
|||||||
local cur prev words cword jc_commands jc_parsers jc_options \
|
local cur prev words cword jc_commands jc_parsers jc_options \
|
||||||
jc_about_options jc_about_mod_options jc_help_options jc_special_options
|
jc_about_options jc_about_mod_options jc_help_options jc_special_options
|
||||||
|
|
||||||
jc_commands=(acpi airport arp blkid cbt chage cksum crontab date df dig dmidecode dpkg du env file findmnt finger free git gpg hciconfig id ifconfig iostat iptables iw iwconfig jobs last lastb ls lsblk lsmod lsof lspci lsusb md5 md5sum mdadm mount mpstat netstat nmcli ntpq os-prober pidstat ping ping6 pip pip3 postconf printenv ps route rpm rsync sfdisk sha1sum sha224sum sha256sum sha384sum sha512sum shasum ss ssh sshd stat sum sysctl systemctl systeminfo timedatectl top tracepath tracepath6 traceroute traceroute6 udevadm ufw uname update-alternatives upower uptime vdir vmstat w wc who xrandr zipinfo)
|
jc_commands=(acpi airport arp blkid cbt chage cksum crontab date df dig dmidecode dpkg du env file findmnt finger free git gpg hciconfig id ifconfig iostat iptables iw iwconfig jobs last lastb ls lsblk lsmod lsof lspci lsusb md5 md5sum mdadm mount mpstat netstat nmcli ntpq os-prober pidstat ping ping6 pip pip3 postconf printenv ps route rpm rsync sfdisk sha1sum sha224sum sha256sum sha384sum sha512sum shasum ss ssh sshd stat sum sysctl systemctl systeminfo timedatectl top tracepath tracepath6 traceroute traceroute6 udevadm ufw uname update-alternatives upower uptime vdir vmstat w wc who xrandr zipinfo zpool)
|
||||||
jc_parsers=(--acpi --airport --airport-s --arp --asciitable --asciitable-m --blkid --cbt --cef --cef-s --chage --cksum --clf --clf-s --crontab --crontab-u --csv --csv-s --date --datetime-iso --df --dig --dir --dmidecode --dpkg-l --du --email-address --env --file --findmnt --finger --free --fstab --git-log --git-log-s --git-ls-remote --gpg --group --gshadow --hash --hashsum --hciconfig --history --hosts --id --ifconfig --ini --ini-dup --iostat --iostat-s --ip-address --iptables --iw-scan --iwconfig --jar-manifest --jobs --jwt --kv --last --ls --ls-s --lsblk --lsmod --lsof --lspci --lsusb --m3u --mdadm --mount --mpstat --mpstat-s --netstat --nmcli --ntpq --openvpn --os-prober --passwd --pci-ids --pgpass --pidstat --pidstat-s --ping --ping-s --pip-list --pip-show --plist --postconf --proc --proc-buddyinfo --proc-consoles --proc-cpuinfo --proc-crypto --proc-devices --proc-diskstats --proc-filesystems --proc-interrupts --proc-iomem --proc-ioports --proc-loadavg --proc-locks --proc-meminfo --proc-modules --proc-mtrr --proc-pagetypeinfo --proc-partitions --proc-slabinfo --proc-softirqs --proc-stat --proc-swaps --proc-uptime --proc-version --proc-vmallocinfo --proc-vmstat --proc-zoneinfo --proc-driver-rtc --proc-net-arp --proc-net-dev --proc-net-dev-mcast --proc-net-if-inet6 --proc-net-igmp --proc-net-igmp6 --proc-net-ipv6-route --proc-net-netlink --proc-net-netstat --proc-net-packet --proc-net-protocols --proc-net-route --proc-net-unix --proc-pid-fdinfo --proc-pid-io --proc-pid-maps --proc-pid-mountinfo --proc-pid-numa-maps --proc-pid-smaps --proc-pid-stat --proc-pid-statm --proc-pid-status --ps --route --rpm-qi --rsync --rsync-s --semver --sfdisk --shadow --ss --ssh-conf --sshd-conf --stat --stat-s --sysctl --syslog --syslog-s --syslog-bsd --syslog-bsd-s --systemctl --systemctl-lj --systemctl-ls --systemctl-luf --systeminfo --time --timedatectl --timestamp --toml --top --top-s --tracepath --traceroute --udevadm --ufw --ufw-appinfo --uname --update-alt-gs --update-alt-q --upower --uptime --url --ver --vmstat --vmstat-s --w --wc --who --x509-cert --xml --xrandr --yaml --zipinfo)
|
jc_parsers=(--acpi --airport --airport-s --arp --asciitable --asciitable-m --blkid --cbt --cef --cef-s --chage --cksum --clf --clf-s --crontab --crontab-u --csv --csv-s --date --datetime-iso --df --dig --dir --dmidecode --dpkg-l --du --email-address --env --file --findmnt --finger --free --fstab --git-log --git-log-s --git-ls-remote --gpg --group --gshadow --hash --hashsum --hciconfig --history --hosts --id --ifconfig --ini --ini-dup --iostat --iostat-s --ip-address --iptables --iw-scan --iwconfig --jar-manifest --jobs --jwt --kv --last --ls --ls-s --lsblk --lsmod --lsof --lspci --lsusb --m3u --mdadm --mount --mpstat --mpstat-s --netstat --nmcli --ntpq --openvpn --os-prober --passwd --pci-ids --pgpass --pidstat --pidstat-s --ping --ping-s --pip-list --pip-show --plist --postconf --proc --proc-buddyinfo --proc-consoles --proc-cpuinfo --proc-crypto --proc-devices --proc-diskstats --proc-filesystems --proc-interrupts --proc-iomem --proc-ioports --proc-loadavg --proc-locks --proc-meminfo --proc-modules --proc-mtrr --proc-pagetypeinfo --proc-partitions --proc-slabinfo --proc-softirqs --proc-stat --proc-swaps --proc-uptime --proc-version --proc-vmallocinfo --proc-vmstat --proc-zoneinfo --proc-driver-rtc --proc-net-arp --proc-net-dev --proc-net-dev-mcast --proc-net-if-inet6 --proc-net-igmp --proc-net-igmp6 --proc-net-ipv6-route --proc-net-netlink --proc-net-netstat --proc-net-packet --proc-net-protocols --proc-net-route --proc-net-unix --proc-pid-fdinfo --proc-pid-io --proc-pid-maps --proc-pid-mountinfo --proc-pid-numa-maps --proc-pid-smaps --proc-pid-stat --proc-pid-statm --proc-pid-status --ps --route --rpm-qi --rsync --rsync-s --semver --sfdisk --shadow --ss --ssh-conf --sshd-conf --stat --stat-s --sysctl --syslog --syslog-s --syslog-bsd --syslog-bsd-s --systemctl --systemctl-lj --systemctl-ls --systemctl-luf --systeminfo --time --timedatectl --timestamp --toml --top --top-s --tracepath --traceroute --udevadm --ufw --ufw-appinfo --uname --update-alt-gs --update-alt-q --upower --uptime --url --ver --vmstat --vmstat-s --w --wc --who --x509-cert --xml --xrandr --yaml --zipinfo --zpool-iostat)
|
||||||
jc_options=(--force-color -C --debug -d --monochrome -m --meta-out -M --pretty -p --quiet -q --raw -r --unbuffer -u --yaml-out -y)
|
jc_options=(--force-color -C --debug -d --monochrome -m --meta-out -M --pretty -p --quiet -q --raw -r --unbuffer -u --yaml-out -y)
|
||||||
jc_about_options=(--about -a)
|
jc_about_options=(--about -a)
|
||||||
jc_about_mod_options=(--pretty -p --yaml-out -y --monochrome -m --force-color -C)
|
jc_about_mod_options=(--pretty -p --yaml-out -y --monochrome -m --force-color -C)
|
||||||
|
@ -9,7 +9,7 @@ _jc() {
|
|||||||
jc_help_options jc_help_options_describe \
|
jc_help_options jc_help_options_describe \
|
||||||
jc_special_options jc_special_options_describe
|
jc_special_options jc_special_options_describe
|
||||||
|
|
||||||
jc_commands=(acpi airport arp blkid cbt chage cksum crontab date df dig dmidecode dpkg du env file findmnt finger free git gpg hciconfig id ifconfig iostat iptables iw iwconfig jobs last lastb ls lsblk lsmod lsof lspci lsusb md5 md5sum mdadm mount mpstat netstat nmcli ntpq os-prober pidstat ping ping6 pip pip3 postconf printenv ps route rpm rsync sfdisk sha1sum sha224sum sha256sum sha384sum sha512sum shasum ss ssh sshd stat sum sysctl systemctl systeminfo timedatectl top tracepath tracepath6 traceroute traceroute6 udevadm ufw uname update-alternatives upower uptime vdir vmstat w wc who xrandr zipinfo)
|
jc_commands=(acpi airport arp blkid cbt chage cksum crontab date df dig dmidecode dpkg du env file findmnt finger free git gpg hciconfig id ifconfig iostat iptables iw iwconfig jobs last lastb ls lsblk lsmod lsof lspci lsusb md5 md5sum mdadm mount mpstat netstat nmcli ntpq os-prober pidstat ping ping6 pip pip3 postconf printenv ps route rpm rsync sfdisk sha1sum sha224sum sha256sum sha384sum sha512sum shasum ss ssh sshd stat sum sysctl systemctl systeminfo timedatectl top tracepath tracepath6 traceroute traceroute6 udevadm ufw uname update-alternatives upower uptime vdir vmstat w wc who xrandr zipinfo zpool)
|
||||||
jc_commands_describe=(
|
jc_commands_describe=(
|
||||||
'acpi:run "acpi" command with magic syntax.'
|
'acpi:run "acpi" command with magic syntax.'
|
||||||
'airport:run "airport" command with magic syntax.'
|
'airport:run "airport" command with magic syntax.'
|
||||||
@ -102,8 +102,9 @@ _jc() {
|
|||||||
'who:run "who" command with magic syntax.'
|
'who:run "who" command with magic syntax.'
|
||||||
'xrandr:run "xrandr" command with magic syntax.'
|
'xrandr:run "xrandr" command with magic syntax.'
|
||||||
'zipinfo:run "zipinfo" command with magic syntax.'
|
'zipinfo:run "zipinfo" command with magic syntax.'
|
||||||
|
'zpool:run "zpool" command with magic syntax.'
|
||||||
)
|
)
|
||||||
jc_parsers=(--acpi --airport --airport-s --arp --asciitable --asciitable-m --blkid --cbt --cef --cef-s --chage --cksum --clf --clf-s --crontab --crontab-u --csv --csv-s --date --datetime-iso --df --dig --dir --dmidecode --dpkg-l --du --email-address --env --file --findmnt --finger --free --fstab --git-log --git-log-s --git-ls-remote --gpg --group --gshadow --hash --hashsum --hciconfig --history --hosts --id --ifconfig --ini --ini-dup --iostat --iostat-s --ip-address --iptables --iw-scan --iwconfig --jar-manifest --jobs --jwt --kv --last --ls --ls-s --lsblk --lsmod --lsof --lspci --lsusb --m3u --mdadm --mount --mpstat --mpstat-s --netstat --nmcli --ntpq --openvpn --os-prober --passwd --pci-ids --pgpass --pidstat --pidstat-s --ping --ping-s --pip-list --pip-show --plist --postconf --proc --proc-buddyinfo --proc-consoles --proc-cpuinfo --proc-crypto --proc-devices --proc-diskstats --proc-filesystems --proc-interrupts --proc-iomem --proc-ioports --proc-loadavg --proc-locks --proc-meminfo --proc-modules --proc-mtrr --proc-pagetypeinfo --proc-partitions --proc-slabinfo --proc-softirqs --proc-stat --proc-swaps --proc-uptime --proc-version --proc-vmallocinfo --proc-vmstat --proc-zoneinfo --proc-driver-rtc --proc-net-arp --proc-net-dev --proc-net-dev-mcast --proc-net-if-inet6 --proc-net-igmp --proc-net-igmp6 --proc-net-ipv6-route --proc-net-netlink --proc-net-netstat --proc-net-packet --proc-net-protocols --proc-net-route --proc-net-unix --proc-pid-fdinfo --proc-pid-io --proc-pid-maps --proc-pid-mountinfo --proc-pid-numa-maps --proc-pid-smaps --proc-pid-stat --proc-pid-statm --proc-pid-status --ps --route --rpm-qi --rsync --rsync-s --semver --sfdisk --shadow --ss --ssh-conf --sshd-conf --stat --stat-s --sysctl --syslog --syslog-s --syslog-bsd --syslog-bsd-s --systemctl --systemctl-lj --systemctl-ls --systemctl-luf --systeminfo --time --timedatectl --timestamp --toml --top --top-s --tracepath --traceroute --udevadm --ufw --ufw-appinfo --uname --update-alt-gs --update-alt-q --upower --uptime --url --ver --vmstat --vmstat-s --w --wc --who --x509-cert --xml --xrandr --yaml --zipinfo)
|
jc_parsers=(--acpi --airport --airport-s --arp --asciitable --asciitable-m --blkid --cbt --cef --cef-s --chage --cksum --clf --clf-s --crontab --crontab-u --csv --csv-s --date --datetime-iso --df --dig --dir --dmidecode --dpkg-l --du --email-address --env --file --findmnt --finger --free --fstab --git-log --git-log-s --git-ls-remote --gpg --group --gshadow --hash --hashsum --hciconfig --history --hosts --id --ifconfig --ini --ini-dup --iostat --iostat-s --ip-address --iptables --iw-scan --iwconfig --jar-manifest --jobs --jwt --kv --last --ls --ls-s --lsblk --lsmod --lsof --lspci --lsusb --m3u --mdadm --mount --mpstat --mpstat-s --netstat --nmcli --ntpq --openvpn --os-prober --passwd --pci-ids --pgpass --pidstat --pidstat-s --ping --ping-s --pip-list --pip-show --plist --postconf --proc --proc-buddyinfo --proc-consoles --proc-cpuinfo --proc-crypto --proc-devices --proc-diskstats --proc-filesystems --proc-interrupts --proc-iomem --proc-ioports --proc-loadavg --proc-locks --proc-meminfo --proc-modules --proc-mtrr --proc-pagetypeinfo --proc-partitions --proc-slabinfo --proc-softirqs --proc-stat --proc-swaps --proc-uptime --proc-version --proc-vmallocinfo --proc-vmstat --proc-zoneinfo --proc-driver-rtc --proc-net-arp --proc-net-dev --proc-net-dev-mcast --proc-net-if-inet6 --proc-net-igmp --proc-net-igmp6 --proc-net-ipv6-route --proc-net-netlink --proc-net-netstat --proc-net-packet --proc-net-protocols --proc-net-route --proc-net-unix --proc-pid-fdinfo --proc-pid-io --proc-pid-maps --proc-pid-mountinfo --proc-pid-numa-maps --proc-pid-smaps --proc-pid-stat --proc-pid-statm --proc-pid-status --ps --route --rpm-qi --rsync --rsync-s --semver --sfdisk --shadow --ss --ssh-conf --sshd-conf --stat --stat-s --sysctl --syslog --syslog-s --syslog-bsd --syslog-bsd-s --systemctl --systemctl-lj --systemctl-ls --systemctl-luf --systeminfo --time --timedatectl --timestamp --toml --top --top-s --tracepath --traceroute --udevadm --ufw --ufw-appinfo --uname --update-alt-gs --update-alt-q --upower --uptime --url --ver --vmstat --vmstat-s --w --wc --who --x509-cert --xml --xrandr --yaml --zipinfo --zpool-iostat)
|
||||||
jc_parsers_describe=(
|
jc_parsers_describe=(
|
||||||
'--acpi:`acpi` command parser'
|
'--acpi:`acpi` command parser'
|
||||||
'--airport:`airport -I` command parser'
|
'--airport:`airport -I` command parser'
|
||||||
@ -293,6 +294,7 @@ _jc() {
|
|||||||
'--xrandr:`xrandr` command parser'
|
'--xrandr:`xrandr` command parser'
|
||||||
'--yaml:YAML file parser'
|
'--yaml:YAML file parser'
|
||||||
'--zipinfo:`zipinfo` command parser'
|
'--zipinfo:`zipinfo` command parser'
|
||||||
|
'--zpool-iostat:`zpool iostat` command parser'
|
||||||
)
|
)
|
||||||
jc_options=(--force-color -C --debug -d --monochrome -m --meta-out -M --pretty -p --quiet -q --raw -r --unbuffer -u --yaml-out -y)
|
jc_options=(--force-color -C --debug -d --monochrome -m --meta-out -M --pretty -p --quiet -q --raw -r --unbuffer -u --yaml-out -y)
|
||||||
jc_options_describe=(
|
jc_options_describe=(
|
||||||
|
@ -42,8 +42,7 @@ Parameters:
|
|||||||
underscore '_'. You should also ensure headers are
|
underscore '_'. You should also ensure headers are
|
||||||
lowercase by using .lower().
|
lowercase by using .lower().
|
||||||
|
|
||||||
Also, ensure there are no blank lines (list items)
|
Also, ensure there are no blank rows in the data.
|
||||||
in the data.
|
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
|
125
docs/parsers/zpool_iostat.md
Normal file
125
docs/parsers/zpool_iostat.md
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
[Home](https://kellyjonbrazil.github.io/jc/)
|
||||||
|
<a id="jc.parsers.zpool_iostat"></a>
|
||||||
|
|
||||||
|
# jc.parsers.zpool\_iostat
|
||||||
|
|
||||||
|
jc - JSON Convert `zpool iostat` command output parser
|
||||||
|
|
||||||
|
Supports with or without the `-v` flag.
|
||||||
|
|
||||||
|
Usage (cli):
|
||||||
|
|
||||||
|
$ zpool iostat | jc --zpool-iostat
|
||||||
|
|
||||||
|
or
|
||||||
|
|
||||||
|
$ jc zpool iostat
|
||||||
|
|
||||||
|
Usage (module):
|
||||||
|
|
||||||
|
import jc
|
||||||
|
result = jc.parse('zpool_iostat', zpool_iostat_command_output)
|
||||||
|
|
||||||
|
Schema:
|
||||||
|
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"pool": string,
|
||||||
|
"parent": string,
|
||||||
|
"cap_alloc": float,
|
||||||
|
"cap_alloc_unit": string,
|
||||||
|
"cap_free": float,
|
||||||
|
"cap_free_unit": string,
|
||||||
|
"ops_read": integer,
|
||||||
|
"ops_write": integer,
|
||||||
|
"bw_read": float,
|
||||||
|
"bw_read_unit": string,
|
||||||
|
"bw_write": float,
|
||||||
|
"bw_write_unit": string
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
$ zpool iostat -v | jc --zpool-iostat -p
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"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": "726060ALE614-K8JAPRGN:10",
|
||||||
|
"parent": "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"
|
||||||
|
},
|
||||||
|
...
|
||||||
|
]
|
||||||
|
|
||||||
|
$ zpool iostat | jc --zpool-iostat -p -r
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"pool": "zhgstera6",
|
||||||
|
"cap_alloc": "2.89T",
|
||||||
|
"cap_free": "2.20T",
|
||||||
|
"ops_read": "0",
|
||||||
|
"ops_write": "2",
|
||||||
|
"bw_read": "349K",
|
||||||
|
"bw_write": "448K"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pool": "726060ALE614-K8JAPRGN:10",
|
||||||
|
"parent": "zhgstera6",
|
||||||
|
"cap_alloc": "2.89T",
|
||||||
|
"cap_free": "2.20T",
|
||||||
|
"ops_read": "0",
|
||||||
|
"ops_write": "2",
|
||||||
|
"bw_read": "349K",
|
||||||
|
"bw_write": "448K"
|
||||||
|
},
|
||||||
|
...
|
||||||
|
]
|
||||||
|
|
||||||
|
<a id="jc.parsers.zpool_iostat.parse"></a>
|
||||||
|
|
||||||
|
### parse
|
||||||
|
|
||||||
|
```python
|
||||||
|
def parse(data: str,
|
||||||
|
raw: bool = False,
|
||||||
|
quiet: bool = False) -> List[JSONDictType]
|
||||||
|
```
|
||||||
|
|
||||||
|
Main text parsing function
|
||||||
|
|
||||||
|
Parameters:
|
||||||
|
|
||||||
|
data: (string) text data to parse
|
||||||
|
raw: (boolean) unprocessed output if True
|
||||||
|
quiet: (boolean) suppress warning messages if True
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
List of Dictionaries. Raw or processed structured data.
|
||||||
|
|
||||||
|
### Parser Information
|
||||||
|
Compatibility: linux, darwin, freebsd
|
||||||
|
|
||||||
|
Version 1.0 by Kelly Brazil (kellyjonbrazil@gmail.com)
|
@ -36,11 +36,61 @@ Schema:
|
|||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
$ zpool iostat | jc --zpool-iostat -p
|
$ zpool iostat -v | jc --zpool-iostat -p
|
||||||
[]
|
[
|
||||||
|
{
|
||||||
|
"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": "726060ALE614-K8JAPRGN:10",
|
||||||
|
"parent": "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"
|
||||||
|
},
|
||||||
|
...
|
||||||
|
]
|
||||||
|
|
||||||
$ zpool iostat | jc --zpool-iostat -p -r
|
$ zpool iostat | jc --zpool-iostat -p -r
|
||||||
[]
|
[
|
||||||
|
{
|
||||||
|
"pool": "zhgstera6",
|
||||||
|
"cap_alloc": "2.89T",
|
||||||
|
"cap_free": "2.20T",
|
||||||
|
"ops_read": "0",
|
||||||
|
"ops_write": "2",
|
||||||
|
"bw_read": "349K",
|
||||||
|
"bw_write": "448K"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pool": "726060ALE614-K8JAPRGN:10",
|
||||||
|
"parent": "zhgstera6",
|
||||||
|
"cap_alloc": "2.89T",
|
||||||
|
"cap_free": "2.20T",
|
||||||
|
"ops_read": "0",
|
||||||
|
"ops_write": "2",
|
||||||
|
"bw_read": "349K",
|
||||||
|
"bw_write": "448K"
|
||||||
|
},
|
||||||
|
...
|
||||||
|
]
|
||||||
"""
|
"""
|
||||||
from typing import List, Dict
|
from typing import List, Dict
|
||||||
from jc.jc_types import JSONDictType
|
from jc.jc_types import JSONDictType
|
||||||
@ -127,8 +177,8 @@ def parse(
|
|||||||
line_list = line.strip().split()
|
line_list = line.strip().split()
|
||||||
if line.startswith(' '):
|
if line.startswith(' '):
|
||||||
output_line = {
|
output_line = {
|
||||||
"pool": line_list[0],
|
"pool": line_list[0],
|
||||||
"parent": pool_parent
|
"parent": pool_parent
|
||||||
}
|
}
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user