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.
30 lines
609 B
Makefile
30 lines
609 B
Makefile
# Created by: Martin Matuska <mm@FreeBSD.org>
|
|
# $FreeBSD$
|
|
|
|
PORTNAME= zfs-stats
|
|
PORTVERSION= 1.3.0
|
|
PORTREVISION= 1
|
|
CATEGORIES= sysutils
|
|
MASTER_SITES= GH
|
|
|
|
MAINTAINER= mm@FreeBSD.org
|
|
COMMENT= Display human-readable ZFS statistics
|
|
|
|
LICENSE= BSD2CLAUSE
|
|
|
|
USES= perl5 shebangfix
|
|
USE_GITHUB= yes
|
|
GH_ACCOUNT= mmatuska
|
|
|
|
NO_BUILD= yes
|
|
SHEBANG_FILES= zfs-*
|
|
perl_OLD_CMD= "/usr/bin/env -iS perl"
|
|
|
|
PLIST_FILES= bin/zfs-stats \
|
|
bin/zfs-mon
|
|
|
|
do-install:
|
|
${INSTALL_SCRIPT} ${WRKSRC}/zfs-stats ${STAGEDIR}${PREFIX}/bin/zfs-stats
|
|
${INSTALL_SCRIPT} ${WRKSRC}/zfs-mon ${STAGEDIR}${PREFIX}/bin/zfs-mon
|
|
|
|
.include <bsd.port.mk>
|