ports/sysutils/munin-node/plugins/zfs_compress
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

27 lines
452 B
Bash

#!/bin/sh
#
# $FreeBSD$
set -e
set -u
cat <<'EOM'
graph_title ZFS dataset compression ratio
graph_vlabel ratio
graph_category ZFS
graph_info This graph shows the ZFS dataset compression ratio
EOM
listing=$(zfs get -t filesystem -H compressratio)
while read -r label _ ratio _; do
clean_label=$(echo "${label}" | sed -e 's|/|__|g')
echo "${clean_label}.label ${label}"
echo "${clean_label}.value ${ratio%x}"
done <<eot
${listing}
eot
exit 0