这篇文章主要介绍了怎么用db2cos监控db2diag中的特定错误信息并抓取相应的app信息,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。
Copy the db2cos script
Modify below section:
“DIAGSTRING”)
echo “Diag String Caught” >> $logfile
if [ ! -n “$database” ]
then
db2pd -inst >> $db2pd_outfile
else
diagfile=$diagpathdb2diag.log
#get lastest MAX_LOG or NUM_LOG_SPAN or lock_escalation info from diag
echo “——-info from diag” >> $logfile
#MAX_LOG
#errstring=’ADM1542W’
#NUM_LOG_SPAN
#errstring=’ADM1541W’
#lock_escalation
errstring=’ADM5502W’
grep -ip $errstring $diagfile|tail -11 >> $logfile
#get application handle
appnum=`echo $apphd免费主机域名l|awk -F ‘-‘ ‘{print $2}’`
#get snapshot for this application
echo “The application info which causing the error – APPID:$appnum” >> $logfile
db2 get snap免费主机域名shot for application agentid $appnum >> $logfile
fi
;;
Run command as below:
Run command to start catch info:
MAX_LOG:
db2pdcfg -catch diagstr=’ADM1542W’ count=1
NUM_LOG_SPAN:
db2pdcfg -catch diagstr=’ADM1541W’ count=1
lock escalation:
db2pdcfg -catch diagstr=’ADM5502W’ count=1
clear catch after things happened:
db2pdcfg -catch clear
check diagpath for file like *.cos.txt感谢你能够认真阅读完这篇文章,希望小编分享的“怎么用db2cos监控db2diag中的特定错误信息并抓取相应的app信息”这篇文章对大家有帮助,同时也希望大家多多支持云技术,关注云技术行业资讯频道,更多相关知识等着你来学习!
相关推荐: windows下Oracle静默安装所需orcl.dbc怎么配置
小编给大家分享一下windows下Oracle静默安装所需orcl.dbc怎么配置,希望大家阅读完这篇文章之后都有所收获,下面让我们一起去探讨吧! MULTIPURPOSE 20 40 false false {ORACLE_BASE}admin{DB_UNI…