RSS

Using the ADRCI utility with Oracle Weblogic

25 Nov

ADRCI (Automatic Diagnostic Repository Command Interface) is a command line utility that originated as a Oracle database software utility. Recent versions of Oracle Weblogic also include this utility. For the experienced DBA this utility will probably hold no secrets, but for the friendly neighborhood middleware admins some quick start instructions might save you some time.

What does it do:
If your Weblogic Managed Server detects a problem (and incident) it will generate a diagnostics dump and store it in the folder: %DOMAIN_HOME%/servers/myManagedServer1/adr/diag

The command-tool (adrci) is located in your %WL_HOME%\server\adr folder.
Before starting the tool, make sure this folder is added to your PATH (I explain later why).
Windows => Set PATH=C:\Oracle\Middleware\wlserver_10.3\server\adr;%PATH%
Linux => export PATH=$PATH:/opt/oracle/middleware/wlserver_10.3/server/adr/

First we need to set the adr base folder, and then possibly check it:

adrci> set base c:/Oracle/Middleware/user_projects/domains/myDomain/servers/osb_server1/adr
adrci> show home
ADR Homes:
diag\ofm\myDomain\osb_server1

Now lets look at the problems registered:

adrci> show problem
*********************************************************************************
PROBLEM_ID  PROBLEM_KEY                               LAST_INCIDENT   LASTINC_TIME
-------------------- ------------------------------------------------------------
2           BEA-802 [Kernel]                          14              2011-11-22 18:00:00.000000 +01:00
3           BEA-101017 [HTTP][java.io.IOException]    13              2011-11-21 17:00:00.000000 +01:00

A problem may occur multiple times, each occurance is registered as an incident. The problem view only shows it’s last incident ID and occurance.

To get an basic overview of all the incidents:


adrci> show incident -mode BASIC

ADR Home = c:\oracle\middleware\user_projects\domains\myDomain\servers\osb_server1\adr\diag\ofm\myDomain\osb_server1:

*************************************************************************
INCIDENT_ID     PROBLEM_KEY                             CREATE_TIME
-------------------------------------------------------------------------
11              BEA-802 [Kernel]                        2011-11-19 15:00:00.000000 +01:00
12              BEA-802 [Kernel]                        2011-11-20 16:00:00.000000 +01:00
13              BEA-101017 [HTTP][java.io.IOException]  2011-11-21 17:00:00.000000 +01:00
14              BEA-802 [Kernel]                        2011-11-22 18:00:00.000000 +01:00

To get a detailed overview of a specific incident:


adrci> show incident -mode DETAIL -p "incident_id=13"

ADR Home = c:\oracle\middleware\user_projects\domains\myDomain\serves\osb_server1\adr\diag\ofm\myDomain\osb_server1:
*************************************************************************

**********************************************************
INCIDENT INFO RECORD 1
**********************************************************
INCIDENT_ID                   13
STATUS                        ready
CREATE_TIME                   2011-11-21 17:00:00.000000 +01:00
PROBLEM_ID                    3
CLOSE_TIME                    <NULL>
FLOOD_CONTROLLED              none
ERROR_FACILITY                BEA
ERROR_NUMBER                  101017
ERROR_ARG1                    <NULL>
ERROR_ARG2                    <NULL>
ERROR_ARG3                    <NULL>
ERROR_ARG4                    <NULL>
ERROR_ARG5                    <NULL>
ERROR_ARG6                    <NULL>
ERROR_ARG7                    <NULL>
ERROR_ARG8                    <NULL>
SIGNALLING_COMPONENT          <NULL>
SIGNALLING_SUBCOMPONENT       <NULL>
SUSPECT_COMPONENT             <NULL>
SUSPECT_SUBCOMPONENT          <NULL>
ECID                          da261c9725811311
IMPACTS                       0
PROBLEM_KEY                   BEA-101017 [HTTP][java.io.IOException]
FIRST_INCIDENT                8
FIRSTINC_TIME                 2011-11-04 12:00:00.000000 +01:00
LAST_INCIDENT                 13
LASTINC_TIME                  2011-11-21 17:00:00.000000 +01:00
IMPACT1                       0
IMPACT2                       0
IMPACT3                       0
IMPACT4                       0
KEY_NAME                      ECID
KEY_VALUE                     da261c9725811311:......
OWNER_ID                      1
INCIDENT_FILE                 ...\osb_server1\inciden\incdir_13\diagnostic_image_osb_server1.zip
OWNER_ID                      1
INCIDENT_FILE                 ...\osb_server1\inciden\incdir_13\dms_metrics2_i13.dmp
OWNER_ID                      1
INCIDENT_FILE                 ...\osb_server1\inciden\incdir_13\odl_logs4_i13.dmp
OWNER_ID                      1
INCIDENT_FILE                 ...\osb_server1\inciden\incdir_13\readme.txt
OWNER_ID                      1
INCIDENT_FILE                 ...\osb_server1\inciden\incdir_13\odl_logs3_i13.dmp
OWNER_ID                      1
INCIDENT_FILE                 ...\osb_server1\inciden\incdir_13\jvm_threads1_i13.dmp
1 rows fetched

We can create a package for the specific incident 13, or a package for the whole problem 3

adrci> IPS CREATE PACKAGE INCIDENT 13
Created package 4 based on incident id 13, correlation level typical

adrci> IPS CREATE PACKAGE PROBLEM 3
Created package 5 based on problem id 3, correlation level typical

We now have 2 logical packages, which means they were created but not yet written to disk.To be able to send the packages to Oracle Support we have to fire off the following command:

adrci> IPS GENERATE PACKAGE 4 IN c:/temp
Generated package 4 in file c:/temp\BEA101017_20111125160000_COM_1.zip, mode complete

adrci> IPS GENERATE PACKAGE 5 IN c:/temp
Generated package 5 in file c:/temp\BEA802Ker_20111125160001_COM_1.zip, mode complete

Voila, you have your package ready to send to Oracle Support.

Remark:
If you FORGOT to set the PATH before starting ADRCI, you may receive this error message:

adrci> IPS GENERATE PACKAGE 1 IN c:/temp
 'perl' is not recognized as an internal or external command,
 operable program or batch file.
 'perl' is not recognized as an internal or external command,
 operable program or batch file.
 'zip' is not recognized as an internal or external command,
 operable program or batch file.
 DIA-49450: Non-zero return code from archiving utility [0] [1]

*Update 28-11-2011*
Found a excellent blogpost from Uwe Hesse which also covers the ADRCI commands for managing trace files. Added Link below.

Links:

About these ads
 
Leave a comment

Posted by on 25-11-2011 in Weblogic

 

Tags: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 335 other followers

%d bloggers like this: