[OmniOS-discuss] Using zpool iostat

Eric Sproul esproul at omniti.com
Wed Aug 21 19:23:55 UTC 2013


On Wed, Aug 21, 2013 at 3:00 PM, Alexandre NEY <aney at ivision.fr> wrote:
> Alright then !
>
> Thank you for the information, I wasn't aware of this first output thing and couldn't find anything in the man page referring to that. So everything is working as intended. Do you know if there is a way to bypass that first output to directly get the *actual* statistics and not *since boot* ?
>
> Thanks !

For what purpose?  These are meant to be human-readable, but it sounds
like you want to scrape the output for monitoring purposes.  There's a
better way, and it's called kstat(1).  :)

# kstat -p 'zfs:0:rpool:reads'
zfs:0:rpool:reads 7719

# kstat -p 'zfs:0:rpool:writes'
zfs:0:rpool:writes 22348

These are counters maintained by the kernel, so you can derive over
time to graph I/O activity, for example.  There are programmatic
interfaces to kstat as well, if that interests you.  See
libkstat(3LIB), Kstat(3PERL).

Eric


More information about the OmniOS-discuss mailing list