oradebug.sh os信息收集脚本
oradebug.sh 这里发一个os信息收集脚本,放电脑了怕下次找不到,这里记录下
#!/usr/bin/ksh
######################################################################
# osdebug.sh
#
# VARIABLES
LOG="$HOME/osdebug_`date -u +'%h_%d_%Y_%H.out'`"
INTERVAL=60
NETSTAT="/bin/netstat -ais"
IOSTAT="/usr/bin/iostat -x"
VMSTAT="/usr/bin/vmstat"
PING="/bin/ping -I 10 -s int-opcbsol2"
######################################################################
until test 0 -eq 1
do
echo " " >> $LOG
echo "------------------------------------------------------" >> $LOG
echo " " >> $LOG
echo "$NETSTAT Output:" >> $LOG
date >> $LOG
echo " " >> $LOG
$NETSTAT >> $LOG
echo " " >> $LOG
echo "$IOSTAT Output:" >> $LOG
date >> $LOG
echo " " >> $LOG
$IOSTAT >> $LOG
echo " " >> $LOG
echo "$VMSTAT Output:" >> $LOG
date >> $LOG
echo " " >> $LOG
$VMSTAT >> $LOG
echo " " >> $LOG
echo "$PING Output:" >> $LOG
date >> $LOG
echo " " >> $LOG
$PING >> $LOG &
sleep $INTERVAL
done