Hello List,

I'm new to the list, so please redirect me to the right place if I'm not at the right place.

I'd like to propose a patch to zpool iostat where it outputs the raw (or literal) counters instead of the human-readable output, for machine parsing.

Whilst searching for this, I stumbled on a thread [1] on the freebsd mailinglist, probably for exactly the same reasons; people like to see how their zpool is doing over time.

I haven't thought long and hard, but with some experimenting I came to roughly this output:

./zpool iostat -p
               capacity     operations    bandwidth
pool        alloc   free   read  write   read  write
----------  -----  -----  -----  -----  -----  -----
zroot 1819706376192 6083033448448 14760391 13281024 1320019169280 85995089920

Or with -v:
$ ./zpool iostat -pv
                 capacity     operations    bandwidth
pool          alloc   free   read  write   read  write
------------  -----  -----  -----  -----  -----  -----
zroot 1819704811520 6083035013120 14760391 13284264 1320019169280 86016716800 raidz1 1819704811520 6083035013120 14760391 13284264 1320019169280 86016716800
    gpt/zfs0      -      -  9469851  2815461  459846656000  39679000576
    gpt/zfs1      -      -  9434586  2670780  443475955712  38377684992
    gpt/zfs2      -      -  6295038  2657443  460142014464  39691751424
    gpt/zfs3      -      -  8795875  2729781  443798388736  38365073408
------------  -----  -----  -----  -----  -----  -----


Would such a change benefit the project? Possibly combined with a -H to replace spaces with tabs and skip some headers for "scripted" output?

Regards,
Kai

[1] https://lists.freebsd.org/pipermail/freebsd-fs/2011-December/013149.html



-------------------------------------------
openzfs-developer
Archives: https://www.listbox.com/member/archive/274414/=now
RSS Feed: https://www.listbox.com/member/archive/rss/274414/28015062-cce53afa
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=28015062&id_secret=28015062-f966d51c
Powered by Listbox: http://www.listbox.com

Reply via email to