您好,登录后才能下订单哦!
这篇文章主要介绍了怎么用db2cos监控db2diag中的特定错误信息并抓取相应的app信息,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。
Copy the db2cos script <instance home>/sqllib/bin/ to <instance home>/sqllib/adm/ and modify below section(uncomment one line of errstring as you need):
Modify below section:
"DIAGSTRING")
echo "Diag String Caught" >> $logfile
if [ ! -n "$database" ]
then
db2pd -inst >> $db2pd_outfile
else
diagfile=$diagpath\db2diag.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 $apphdl|awk -F '-' '{print $2}'`
#get snapshot for this application
echo "The application info which causing the error - APPID:$appnum" >> $logfile
db2 get snapshot 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信息”这篇文章对大家有帮助,同时也希望大家多多支持亿速云,关注亿速云行业资讯频道,更多相关知识等着你来学习!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。