freebsd-ports/sysutils/munin-node/plugins/zpool_dedup
Mathieu Arnold b224fa620b Fix swap accounting if there are multiple devices [1]
Add a few zfs related plugins [2]

PR:		210494 [1]
Submitted by:	bcr [2]
Reported by:	Fabian Keil [1]
Sponsored by:	Absolight
2016-08-04 14:26:56 +00:00

25 lines
358 B
Bash

#!/bin/sh
#
# $FreeBSD$
set -e
set -u
cat <<'EOM'
graph_title ZFS deduplication ratio
graph_vlabel ratio
graph_category ZFS
graph_info This graph shows the ZFS pool deduplication ratio
EOM
listing=$(zpool get -H dedup)
while read -r label _ ratio _; do
echo "${label}.label ${label}"
echo "${label}.value ${ratio%x}"
done <<eot
${listing}
eot
exit 0