From fc45515019021847dd779787126f0fee6760d744 Mon Sep 17 00:00:00 2001 From: 12nick12 Date: Wed, 2 Oct 2019 18:07:35 -0400 Subject: [PATCH] Create zfs_get.sh --- zfs_get.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 zfs_get.sh diff --git a/zfs_get.sh b/zfs_get.sh new file mode 100644 index 0000000..ffc20a8 --- /dev/null +++ b/zfs_get.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# LibreNMS ZFS For ZFSonLinux + +for z in $(zpool list -H | cut -f1-1); do + printf "%s\t" ${z} + for f in $(zpool get -pH name,size,alloc,free,expandsz,frag,cap,dedup,health,altroot "${z}" | sed -n '1!p' | cut -f3-3); do + printf "%s\t" ${f} + done + printf "\n" +done