diff options
author | mat <mat@FreeBSD.org> | 2017-11-06 22:39:47 +0800 |
---|---|---|
committer | mat <mat@FreeBSD.org> | 2017-11-06 22:39:47 +0800 |
commit | c86123d3020921d4e5af83502f455c5ee654bf43 (patch) | |
tree | 3ccd0b24965e4a605b4314de7e2145f81e9a83b8 /sysutils/munin-node | |
parent | 1b2a051d30ae0fb075a6bc4092b34d0266df2d54 (diff) | |
download | freebsd-ports-gnome-c86123d3020921d4e5af83502f455c5ee654bf43.tar.gz freebsd-ports-gnome-c86123d3020921d4e5af83502f455c5ee654bf43.tar.zst freebsd-ports-gnome-c86123d3020921d4e5af83502f455c5ee654bf43.zip |
Add a plugin to graph zfs arc compression.
PR: 223423
Submitted by: bcr
Sponsored by: Absolight
Diffstat (limited to 'sysutils/munin-node')
-rw-r--r-- | sysutils/munin-node/Makefile | 1 | ||||
-rw-r--r-- | sysutils/munin-node/pkg-plist | 1 | ||||
-rw-r--r-- | sysutils/munin-node/plugins/zfs_arc_compression | 22 |
3 files changed, 24 insertions, 0 deletions
diff --git a/sysutils/munin-node/Makefile b/sysutils/munin-node/Makefile index f328c3dec37c..484aa5bcfb95 100644 --- a/sysutils/munin-node/Makefile +++ b/sysutils/munin-node/Makefile @@ -3,6 +3,7 @@ PORTNAME= munin PORTVERSION= ${MUNIN_VERSION} +PORTREVISION= 1 CATEGORIES= sysutils perl5 MASTER_SITES= ${MUNIN_SITES} PKGNAMESUFFIX= -node diff --git a/sysutils/munin-node/pkg-plist b/sysutils/munin-node/pkg-plist index aeaa21260cd0..31b36fb16ef5 100644 --- a/sysutils/munin-node/pkg-plist +++ b/sysutils/munin-node/pkg-plist @@ -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 diff --git a/sysutils/munin-node/plugins/zfs_arc_compression b/sysutils/munin-node/plugins/zfs_arc_compression new file mode 100644 index 000000000000..79d5ef2f2197 --- /dev/null +++ b/sysutils/munin-node/plugins/zfs_arc_compression @@ -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 |