From owner-svn-ports-all@freebsd.org Mon Nov 6 14:39:49 2017 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A5B4E5FA2C; Mon, 6 Nov 2017 14:39:49 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE0867179C; Mon, 6 Nov 2017 14:39:48 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vA6Edl2l015673; Mon, 6 Nov 2017 14:39:47 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vA6EdlhA015670; Mon, 6 Nov 2017 14:39:47 GMT (envelope-from mat@FreeBSD.org) Message-Id: <201711061439.vA6EdlhA015670@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Mon, 6 Nov 2017 14:39:47 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r453622 - in head/sysutils/munin-node: . plugins X-SVN-Group: ports-head X-SVN-Commit-Author: mat X-SVN-Commit-Paths: in head/sysutils/munin-node: . plugins X-SVN-Commit-Revision: 453622 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Nov 2017 14:39:49 -0000 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 <