raw filesystem counters

Peter Jeremy peter at rulingia.com
Mon Feb 12 05:55:47 UTC 2018


On 2018-Feb-11 21:06:12 +0200, "E.S. Rosenberg" <esr at cs.huji.ac.il> wrote:
>Is there any way to access raw disk counters similar to those found on
>Linux in:
>/sys/class/block/<device>/stat
>
>Preferably also by accessing such a virtual file and not by using iostat /
>zpool iostat which are already pre-processing counters and need to be run
>constantly to get accurate real-time estimates.

For the raw disk data, have a look at the statistics functions in
libgeom(3).  You can use the source code for gstat(8) to get a better idea
how to drive it.

I don't know of any published API for vdev-level ZFS statistics and,
unfortunately, "zpool iostat" only supports "humanized" output, which makes
it difficult to use them as input to further monitoring.  There are some
ARC statistics under sysctl kstat.zfs.misc

-- 
Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20180212/ed7fb117/attachment.sig>


More information about the freebsd-fs mailing list