In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces how to use db2cos to monitor specific error messages in db2diag and grab the corresponding app information. It has certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article. Let Xiaobian take you to understand it together.
Copy the db2cos script /sqllib/bin/ to /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
Thank you for reading this article carefully. I hope that Xiaobian's article "How to use db2cos to monitor specific error messages in db2diag and grab corresponding app information" will be helpful to everyone. At the same time, I hope that everyone will support you more. Pay attention to the industry information channel. More relevant knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.