User Tools

Site Tools


maintenance

Maintenance scripts pre and post

Pre:

echo "Enter ticket number"; read t; mkdir /home/rack/$t; cd /home/rack/$t; if [ -e /etc/cluster/cluster.conf ];then clustat > clustat.pre; fi; if [ -e /sbin/powermt ]; then /sbin/powermt display dev=all > powermt.pre; fi; free -mt > free.pre; route > route.pre; netstat -ntlp > netstat.pre;uptime > uptime.pre; df -h > df.pre; mount > mount.pre; ps auxfww > ps.pre; uname -a > uname.pre; chkconfig --list > chkconfig.pre; ifconfig > ifconfig.pre; ip addr > ipaddr.pre; omreport chassis memory> omreport.pre; cd /etc; tar czvf /home/rack/$t/etc.tgz *; cd /home/rack/$t; service --status-all > service_status.pre; ll /home/rack/$t

Post:

echo "Enter ticket number"; read t; cd /home/rack/$t; if [ -e /etc/cluster/cluster.conf ];then clustat > clustat.post; fi; if [ -e /sbin/powermt ]; then /sbin/powermt display dev=all > powermt.post; fi; free -mt > free.post; route > route.post; netstat -ntlp > netstat.post; df -h > df.post; mount > mount.post; ps auxfww > ps.post; uname -a > uname.post; chkconfig --list > chkconfig.post; ifconfig > ifconfig.post; ip addr > ipaddr.post; omreport chassis memory> omreport.post; service --status-all > service_status.post; ll /home/rack/$t

diff -iydw –suppress-common-lines

maintenance.txt · Last modified: 2013/11/13 16:29 (external edit)