freebsd-ports/sysutils/zfs-stats
Stefan Eßer 02bdf7ab0a Fix port on -CURRENT
Due to the import of OpenZFS into -CURRENT there have been changes to the
statistics collected and available by querying via sysctl.

One of the changes is the addition of huge amounts of debug data that is
not relevant for this program, but queried anyway (16 MB on my system at
this time). This delays the display of any output by tens of seconds and
makes zfs-stats unusable on -CURRENT.

A number of parameters reported by zfs-stats is not available at all in
OpenZFS and thus always printed as 0.

OpenZFS specific values could be added, but have not been identifed, yet.

This update fixes the problem of long delays on -CURRENT. It determines
whether FreeBSD ZFS or OpenZFS and adapts to the parameters being
provided by the ZFS version found.

This patch adds the on-disk size of the L2ARC and the compression factor to
the existing output of the usable size (content size after decompression).
(I have found that the on-disk size reported under OpenZFS is shrinking
at a rate of about 10% a day on my system for reasons unknown and this
was not obvious without easy access to this value.)

I have sent a pull request to the author and maintainer of this program
4 weeks ago, which has been accepted on Sep 21. I have asked for a port
update on Sep 22 and have also offered to become the maintainer of the
port, but have not reveived any reply.

Since this is a bug that affects all -CURRENT users with ZFS and since
it gives unexpected results on my system, which I want to discuss with
the committers working on OpenZFS, I have decided to commit this patch
after a maintainer time-out of more than 2 weeks.
2020-10-07 13:37:17 +00:00
..
files
distinfo
Makefile
pkg-descr