svn commit: r453622 - in head/sysutils/munin-node: . plugins

Mathieu Arnold mat at FreeBSD.org
Mon Nov 6 14:39:49 UTC 2017


Author: mat
Date: Mon Nov  6 14:39:47 2017
New Revision: 453622
URL: https://svnweb.freebsd.org/changeset/ports/453622

Log:
  Add a plugin to graph zfs arc compression.
  
  PR:		223423
  Submitted by:	bcr
  Sponsored by:	Absolight

Added:
  head/sysutils/munin-node/plugins/zfs_arc_compression   (contents, props changed)
Modified:
  head/sysutils/munin-node/Makefile   (contents, props changed)
  head/sysutils/munin-node/pkg-plist   (contents, props changed)

Modified: head/sysutils/munin-node/Makefile
==============================================================================
--- head/sysutils/munin-node/Makefile	Mon Nov  6 14:24:56 2017	(r453621)
+++ head/sysutils/munin-node/Makefile	Mon Nov  6 14:39:47 2017	(r453622)
@@ -3,6 +3,7 @@
 
 PORTNAME=	munin
 PORTVERSION=	${MUNIN_VERSION}
+PORTREVISION=	1
 CATEGORIES=	sysutils perl5
 MASTER_SITES=	${MUNIN_SITES}
 PKGNAMESUFFIX=	-node

Modified: head/sysutils/munin-node/pkg-plist
==============================================================================
--- head/sysutils/munin-node/pkg-plist	Mon Nov  6 14:24:56 2017	(r453621)
+++ head/sysutils/munin-node/pkg-plist	Mon Nov  6 14:39:47 2017	(r453622)
@@ -256,6 +256,7 @@ sbin/munin-sched
 %%DATADIR%%/plugins/users
 %%PERL%%%%DATADIR%%/plugins/varnish_
 %%DATADIR%%/plugins/vmstat
+%%DATADIR%%/plugins/zfs_arc_compression
 %%DATADIR%%/plugins/zfs_compress
 %%DATADIR%%/plugins/zimbra_
 %%DATADIR%%/plugins/zpool_chksum

Added: head/sysutils/munin-node/plugins/zfs_arc_compression
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/munin-node/plugins/zfs_arc_compression	Mon Nov  6 14:39:47 2017	(r453622)
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# $FreeBSD$
+
+set -e
+set -u
+
+UNCOMP_ARC=$(sysctl -n kstat.zfs.misc.arcstats.uncompressed_size)
+COMP_ARC=$(sysctl -n kstat.zfs.misc.arcstats.compressed_size)
+
+value=$(bc -e scale=2 -e "$UNCOMP_ARC/$COMP_ARC" -e quit)
+
+cat <<EOM
+graph_title ZFS ARC compression ratio
+graph_vlabel ratio
+graph_category ZFS
+graph_info This graph shows the ZFS ARC compression (uncompressed vs. compressed) ratio
+ratio.label ratio
+ratio.value $value
+EOM
+
+exit 0


More information about the svn-ports-all mailing list