/usr/WebSphere/IHS/logs/access_log>/usr/WebSphere/IHS/logs/error_logapforwinbk.shexportDayOfWeek=`date+"%u"`cd/wasbackupcp-rf./WASBackup_"$DayOfWeek".tar./apbkarchive" />
ApacheLogRotate.sh
echo`date`":Clean the apache logs"
>/usr/WebSphere/IHS/logs/access_log
>/usr/WebSphere/IHS/logs/error_log
apforwinbk.sh
export DayOfWeek=`date+"%u"`
cd/wasbackup
cp-rf./WASBackup_"$DayOfWeek".tar./apbk
archiveOld.sh
export TargetDir=/erpHome/jln.ear/erp.war/$1/$2
export TT=`date+"%Y%m%d"`
export DayOfWeek=`date+"%u"`
if(test-e$TargetDir)then
mkdir-p/erpHome/shell/old/$1
cd$TargetDir
#zip-qm/erpHome/old/$1/$2_$TT.zip`find.-mtime+7|awk'{print$0}'` mv/erpHome/shell/old/$1/$2_$DayOfWeek.zip/erpHome/shell/old/$1/$2.zip.old
find.-mtime+7|xargs nice-n20zip-qm /erpHome/shell/old/$1/$2_$DayOfWeek.zip
#find.-mtime+7
Fi
archiveOld2.sh
./erpHome/shell/setP.sh
export DayOfWeek=`date+"%u"`
if test"$#"-lt1||test-z"$1"
then
echo At least one argument needed.
exit
fi
if test!-e"$ShellHome/old/$1"
then
cd$ShellHome/old/
mkdir-p$1
fi
if test!-e"$ERPHome/$1"
then
echo"$ERPHome/$1""does not exist"
exit
fi
cd$ERPHome/$1
mv$ShellHome/old/$1_$DayOfWeek.zip$ShellHome/old/$1.zip.old
find.-mtime+7-type f|xargs nice-n20zip-qm$ShellHome/old/$1_$DayOfWeek.zip #find.-mtime+7-type f
archiveOldAll.sh
/erpHome/shell/archiveOld.sh work/dr/engine jrprint
/erpHome/shell/archiveOld.sh work/de tmp
/erpHome/shell/archiveOld2.sh public
backupLog.sh
echo`date`":Backup the logs"
./erpHome/shell/setP.sh
cd$ERPHome/waslogs
mkdir old/
mv std*_*.txt old/
mv$LOGHome/LOG_$DD.zip$LOGHome/LOG.zip.old
zip-qmr$LOGHome/LOG_$DD.zip`ls$ERPHome/waslogs|grep-Ev"std|FATAL_DEBUG.xml"` ls-l$LOGHome/LOG_$DD.zip
echo`date`":Backup the logs done."
backupWASAll.sh
./erpHome/shell/setP.sh
cd/erpHome
#rename old backup file
echo"####"`date`"ERP program backup####"
#mv/wasbackup/WASBackup_"$DayOfWeek".tar/wasbackup/WASBackup_old.tar
rm-Rf/wasbackup/erpbak/WASBackup_"$DayOfWeek".tar
#backup ERP program
nice-n20tar-cf/wasbackup/erpbak/WASBackup_"$DayOfWeek".tar jln.ear/erp.war DIClient DIServer ThreadPool erpdata
ls-l/wasbackup/erpbak/WASBackup_"$DayOfWeek".tar
collectAudit.sh
./erpHome/shell/setP.sh jln
audit shutdown
auditpr-v$LOGHome/AUDIT_$YYMMDD.txt
mv/audit/trail$LOGHome/trail_$TT
gzip$LOGHome/trail_$TT
audit start
last|grep"$TT2">$LOGHome/LOGIN_$YYMMDD.txt
grep"$TT3"/var/adm/sulog>$LOGHome/SU_$YYMMDD.txt
cplogs.sh
export dd=`perl-e'@y=localtime(time()-86400);printf"%02d\n",$y[3];'`
cd/erpHome/shell/logs
mkdir/test/erplogs
cp./LOG_"$dd".zip/test/erplogs
cpnmon.sh
cd/worktmp/nmon
export dd=`perl-e'@y=localtime(time()-86400);printf"%02d\n",$y[3];'` export d=`date+%y%m`"$dd"
export HOSTNAME=`hostname`
export data="$HOSTNAME"_"$d"_"*"
ftp-n< open10.32.1.138 user nmon nmon cd$HOSTNAME put$data bye EOF ddd.sh cd$1 touch11.txt filter.awk BEGIN{ DiscardURLs="/erp/de/deCommand/erp/jsp/" DiscardAmount=split(DiscardURLs,DiscardURL,"") ResponseThreshold=4.9999 nlines=0 totalCount=0 } function extractTime(myDate,aSize){ if(aSize==2)return myDate[2] if(myDate[2]=="上午")return myDate[3] split(myDate[3],dates,":") return dates[1]+12":"dates[2]":"dates[3] } function isSkip(myURL){ for(i=1;i<=DiscardAmount;i++) if(index(myURL,DiscardURL[i])>0)return1 return0 } { if(isSkip($3)==0){ if(NF==10){ totalCount++; if($4>ResponseThreshold){ mySize=split($2,myDate,"") myTime=extractTime(myDate,mySize) print$1"\t"myTime"\t"$3"\t"$4"\t"$5"\t"$6 nlines++ } } } }END{ print"本日网页执行总次数:"totalCount"(JSP,servlet,但不包含图片等静态网页,也不包含/erp/jsp/开头的这些监控画面)" print"共"nlines"笔异常资料" formatHTML.awk BEGIN{ } function getSysName(myURL){ fCount=split(myURL,myArray,"/") return myArray[3] } function getMaxInArray(oArray,oResult,oIndex){ maxValue=0 for(idx in oCount){ if(oCount[idx]>maxValue){ maxValue=oCount[idx] maxSys=idx } } delete oArray[maxSys] oResult[oIndex,1]=maxSys oResult[oIndex,2]=maxValue } function sort(array,result,thresHold){ for(i=1;i<=5;i++){ getMaxInArray(array,result,i) } } { oSys=getSysName($3) if(NF!=6){ print$0" } else{ oCount[oSys]++ oRecord++; print"
" ""$1" "$2 " "$3" "$4" "$5" "$6"
}
}END{
oThreshold oRecord/10
sort(oCount,oResult,oThreshold)
print""
print"