On EBS 12.2 the below script will help to find the EBS Application Module Name which are creating incident. There could be many reasons why the module had an exceptions like Stuck Thread , Null Pointer Exceptions , Application Code Issues or Database Problems. This script can be scheduled on EBS Environment every 24 hours to list down Application Module Name and can be used for troubleshooting.
I have used this script to troubleshoot most of the EBS Customers who are getting upgraded from earlier releases.
aptest@saturn(servers)$ env|grep -i edition
FILE_EDITION=run
aptest@saturn(servers)$
EBS_DOMAIN_NAME=`sed -nre 's:^.*<wls_domain_name oa_var="s_wls_domain_name">(.*)</wls_domain_name>.*$:\1:p' $CONTEXT_FILE`
EBS_OACORE_NAMES=`sed -nre 's:^.*<oa_managed_server_name oa_var="s_oacore_managed_servers">(.*)</oa_managed_server_name>.*$:\1:p' $CONTEXT_FILE|sed 's/,/ /g'`
for oacore in $EBS_OACORE_NAMES
do
cd $EBS_DOMAIN_HOME/servers/$oacore/adr/diag/ofm/$EBS_DOMAIN_NAME/$oacore/incident
for incident in `find . -mindepth 1 -type d -mtime -1`
do
cd $incident
module_count=`grep -i OA.jsp *.txt |cut -d"?" -f2|cut -d"=" -f2|cut -d"&" -f1 |sort|uniq|grep -i "/oracle/"|wc -l`
if [ $module_count -gt 0 ]
then
echo "Monitoring Script has identified the following modules in the Incident - `echo $incident|cut -d'/' -f2` for Manager Server - $oacore"
grep -i OA.jsp *.txt |cut -d"?" -f2|cut -d"=" -f2|cut -d"&" -f1 |sort|uniq|grep -i "/oracle/"
echo "Diag Folder : `pwd`"
echo "------------------------------------------------------------------------"
fi
cd ..
done
done
Sample Output
aptest@saturn(~)$ sh /tmp/wls_analysis.sh
Monitoring Script has identified the following modules in the Incident - incdir_233 for Manager Server - oacore_server2
/oracle/apps/csf/portal/dashboard/webui/CsfDashBoardPG
Diag Folder : /p01/racesoltp/appl/fs1/FMW_Home/user_projects/domains/EBS_domain_test/servers/oacore_server2/adr/diag/ofm/EBS_domain_test/oacore_server2/incident/incdir_233
------------------------------------------------------------------------
Monitoring Script has identified the following modules in the Incident - incdir_341 for Manager Server - oacore_server3
/oracle/apps/csp/portal/requirement/webui/PartsRequirementPG
/oracle/apps/csp/portal/requirement/webui/PartsRequirementSearchPG
Diag Folder : /p01/racesoltp/appl/fs1/FMW_Home/user_projects/domains/EBS_domain_test/servers/oacore_server3/adr/diag/ofm/EBS_domain_test/oacore_server3/incident/incdir_341
------------------------------------------------------------------------
Monitoring Script has identified the following modules in the Incident - incdir_209 for Manager Server - oacore_server4
/oracle/apps/csp/portal/requirement/webui/PartsRequirementPG
Diag Folder : /p01/racesoltp/appl/fs1/FMW_Home/user_projects/domains/EBS_domain_test/servers/oacore_server4/adr/diag/ofm/EBS_domain_test/oacore_server4/incident/incdir_209
------------------------------------------------------------------------
aptest@saturn(~)$
See how nice it is to get the module name out of oacore logs. You have the incident dir that can be packaged and uploaded to Oracle Support. 😌