Collecting Diagnostics from Oracle Hosts for Delphix Support Cases (KBA1763)
KBA
KBA# 1763
This article provides steps for collecting diagnostic information from Oracle hosts to assist with Delphix support cases, including:
- General server information
- Alert log and trace files
- Listener log and status
- OPatch information
- Delphix toolkit logs
- Process run state
General Server Information
Create a directory where all the files can be collected before they get compressed and uploaded to Delphix.
mkdir <case number>
mkdir <case number>
For example:
mkdir /tmp/12345
Copy the system messages file to the temporary directory. For example,
Linux:
cp /var/log/messages /tmp/12345
Solaris:
cp /var/adm/messages /tmp/12345
Alert Log and Trace Files
Find the location of your alert log. For example,
SQL> SELECT VALUE FROM V$DIAG_INFO WHERE NAME = 'Diag Trace'; VALUE -------------------------------------------------------------------------------- /u01/app11/ora11204/diag/rdbms/rh74db01/rh74db01/trace
Go to this directory and copy the alert log file for your database to the temporary directory. For example,
cd /u01/app11/ora11204/diag/rdbms/rh74db01/rh74db01/trace cp alert*.log /tmp/12345
Copy any trace files with your particular error number to the temporary directory. For example,
find . -mtime -1 -type f -name '*.trc' -exec grep -l "ORA-00060" {} \; -exec cp {} /tmp/12345 \;
- Note: This example will include trace files modified in the last day that contain the string "ORA-00060".
Listener Log and Status
Find all of the listeners on the server.
ps -ef|grep tnslsnr
For each listener, capture the status and services to the temporary directory. For example,
lsnrctl status LISTENER > /tmp/12345/LISTENER_status lsnrctl service LISTENER > /tmp/12345/LISTENER_service
For each listener, get the listener log directory. For example,
lsnrctl status LISTENER | grep "Log File" | sed "s/alert\/log.xml/trace/g"
For each listener, copy the log to the temporary directory. For example,
cp /u01/app12/ora12201/diag/tnslsnr/rhel74-ora-src/listener/trace/listener*.log /tmp/12345
OPatch information
For the appropriate database Oracle Home:
- First set ORACLE_HOME to your database home
- If you are unsure about which ORACLE_HOME it should be, you can check the UI, in the Configuration tab, for example
- Set the ORACLE_HOME using whatever method is appropriate for your host, for example
. oraenv ORCL
- Collect the OPatch information and copy it to the temporary directory. For example,
$ORACLE_HOME/OPatch/opatch lsinventory > /tmp/12345/rdbms_opatch.lis
If you have Grid Infrastructure running on this server:
- First set ORACLE_HOME to your Grid Infrastructure home
- Collect the OPatch information and copy it to the temporary directory. For example,
$ORACLE_HOME/OPatch/opatch lsinventory > /tmp/12345/gi_opatch.lis
Delphix Toolkit Logs
- Copy the connector and snapsync directories in the toolkit directory to the temporary directory.
- The following snapsync directory may not exist in your environment.
- Location of the directories in the toolkit directory:
/<toolkit_directory>/Delphix_<engineuuid>_<delphix_osuser>_host/log/connector /<toolkit_directory>/Delphix_<engineuuid>_<delphix_osuser>_host/log/snapsync or /<toolkit_directory>/Delphix_<engineuuid>_<delphix_osuser>_cluster/log/connector /<toolkit_directory>/Delphix_<engineuuid>_<delphix_osuser>_cluster/log/snapsync
For example,
tar cvf /tmp/12345/connector.tar /var/opt/delphix/Toolkit/Delphix_564d736a_5edb_8bf7_f2c1_9be79bc6d2dc_delphix_host/log/connector tar cvf /tmp/12345/snapsync.tar /var/opt/delphix/Toolkit/Delphix_564d736a_5edb_8bf7_f2c1_9be79bc6d2dc_delphix_host/log/snapsync
Process Run State
This is especially important when collecting data for slow or hanging jobs.
- Collect list of running process
- Identify and collect jstack and pstack for each Delphix client process.
Linux ( as root or via sudo )
ps -ef --forest > /tmp/12345/ps.out ps -ef | grep java | grep Delphix oracle 16846 1 3 22:09 ? 00:00:04 /work/Delphix_COMMON_564d8f2c_a863_3ee5_6144_5fed34066879_oracle_host/java/jdk/bin/java -ea -XX:-UseVMInterruptibleIO -Ddelphix.host.os=unix -Ddelphix.toolkit.base.dir=/work -Ddelphix.max.worker=16 -Djava.io.tmpdir=/work/Delphix_564d8f2c_a863_3ee5_6144_5fed34066879_oracle_host/tmp -jar /work/Delphix_COMMON_564d8f2c_a863_3ee5_6144_5fed34066879_oracle_host/client/dsp/client.jar ^ for each process found, perform the following actions. /work/Delphix_COMMON_564d8f2c_a863_3ee5_6144_5fed34066879_oracle_host/java/jdk/bin/jstack -F 16846 > /tmp/12345/jstack.16846.out pstack 16846 > /tmp/12345/pstack.16846.out
Solaris ( as root or via pfexec )
ptree > /tmp/12345/ptree.out ps auxw | grep java | grep Delphix oracle 16846 1 3 22:09 ? 00:00:04 /work/Delphix_COMMON_564d8f2c_a863_3ee5_6144_5fed34066879_oracle_host/java/jdk/bin/java -ea -XX:-UseVMInterruptibleIO -Ddelphix.host.os=unix -Ddelphix.toolkit.base.dir=/work -Ddelphix.max.worker=16 -Djava.io.tmpdir=/work/Delphix_564d8f2c_a863_3ee5_6144_5fed34066879_oracle_host/tmp -jar /work/Delphix_COMMON_564d8f2c_a863_3ee5_6144_5fed34066879_oracle_host/client/dsp/client.jar ^ for each process found, perform the following actions. /work/Delphix_COMMON_564d8f2c_a863_3ee5_6144_5fed34066879_oracle_host/java/jdk/bin/jstack -F 16846 > /tmp/12345/jstack.16846.out pstack 16846 > /tmp/12345/pstack.16846.out
Uploading Logs To Your Support Case
Compress the temporary directory before uploading it. For example,
tar cvf /tmp/12345.tar /tmp/12345 gzip /tmp/12345.tar
Files of less than 50MB in size can be attached directly to the case, using the link contained in emails regarding your open case. Files larger than this size can be attached using https://upload.delphix.com, referencing your case number when prompted.