Created
May 21, 2013 21:12
-
-
Save szaydel/5623295 to your computer and use it in GitHub Desktop.
Basic high-level system state information.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
dt=$(date +"%Y%m%d") | |
hn=$(hostname) | |
commands=( | |
"zfs list" | |
"zfs get all" | |
"zpool list" | |
"zpool status" | |
"zfs list -t snapshot" | |
"echo ::arc|mdb -k" | |
"echo ::zfs_params|mdb -k" | |
"cat /var/adm/messages" | |
"fmdump -e -t90day" | |
"iostat -xnz 1 300" | |
"iostat -en" | |
"kstat -p" | |
"rtdmgr -sas" | |
"rtdmgr -bmsr" | |
"rtdmgr -HEALTHFULL" | |
"rtdmgr -EM" | |
"rtdmgr -E+" | |
"rtdmgr -MAP" | |
"rtdmgr -zdx" | |
"rtdmgr -zde" | |
"rtdmgr -zdT" | |
"rtdmgr -zdL" | |
) | |
for command in "${commands[@]}"; do | |
cmdname=$(echo $command|sed -e 's/[\|\:\/ *]/-/g') | |
logf=support-${cmdname}-${hn}-${dt}.log.gz | |
eval ${command} | gzip -c > $logf | |
done 2>/dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment