Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve ZFS related data #14

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions grml-hwinfo
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,31 @@ cd "${OUTDIR}" || exit 1
fi
fi

# ZFS
if exectest zpool; then
if [ -n "$(zpool list -H -o name)" ]; then
if ! $_opt_quiet ; then
echo "Reading ZFS data... this might take a while."
fi
mkdir -p ./zfs
for pool in $(zpool list -H -o name); do
# for a quick overview
zpool list -vPL "$pool" > ./zfs/"$pool".list 2> ./zfs/"$pool".list.error &
zpool status -vtiP "$pool" > ./zfs/"$pool".status 2> ./zfs/"$pool".status.error &
zpool iostat -rp "$pool" > ./zfs/"$pool".histogram 2> ./zfs/"$pool".histogram.error &
zfs list -o space,referenced,logicalreferenced,quota,refquota -t filesystem,volume -r "$pool" > ./zfs/"$pool".zfslist 2> ./zfs/"$pool".zfslist.error &
# machine parsable data
zpool get -Hp all "$pool" > ./zfs/"$pool".props 2> ./zfs/"$pool".props.error &
zfs get -Hp all "$pool" > ./zfs/"$pool".zfsprops 2> ./zfs/"$pool".zfsprops.error &
done
arc_summary --raw --alternate > ./zfs/arc_summary 2> ./zfs/arc_summary.error &
wait
if ! $_opt_quiet ; then
echo "Finished reading ZFS data."
fi
fi
fi

# iSCSI
if exectest iscsiadm ; then
iscsiadm -m session > iscsiadm_session 2>iscsiadm_session.error
Expand Down