quick and dirty script to obtain info from your server before you reboot

Use the outputs of this script to compare basic health before and after you reboot, transfer the results to another host
just in case the one you reboot doesn’t come up 🙂
B=`uname -n`
mkdir $B
cd $B
df -h > df-h.txt
metastat -p > metastat-p.txt
metastat -t > metastat-t.txt
netstat -nrv > netsat-nrv.txt
ifconfig -a > ifconfig-a.txt
zpool status -v > zpool-status-v.txt
zfs list > zfs-list.txt
format < /dev/null > format.txt
prtconf -vp | grep -i wwn > wwns.txt
zoneadm list > zoneadm.txt
zoneadm list | while read z;do zonecfg -z $z info> ${z}.txt; done
cd ..
chmod 777 $B
cp -fR $B /var/tmp
56/433

Leave a Reply

Your email address will not be published. Required fields are marked *