Create zfs_get.sh

This commit is contained in:
12nick12 2019-10-02 18:07:35 -04:00 committed by GitHub
parent 680bfe1f63
commit fc45515019
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 0 deletions

10
zfs_get.sh Normal file
View File

@ -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