Collecting Diagnostics from Db2 Hosts for Delphix Support Cases (KBA10060)
KBA
KBA# 10060
Issue
This article provides steps for collecting the following diagnostic information from Db2 hosts, to assist with Delphix support cases:
- Db2 Plugin Diagnostic Logs from the Db2 target host (once known as toolkit logs)
- Db2 Database Error Log known as db2diag.log
- Db2 Delphix Connector Logs from Plugin Directories on the Db2 target host
Once you have gathered this information, please upload it for review by your Support Engineer, as described in the section Uploading Logs to Your Support Case.
Prerequisites
Use of the Db2 plugin in conjunction with the Delphix Continuous Data engine for use in virtualizing Db2 databases.
Applicable Delphix Versions
- Click here to view the versions of the Delphix engine to which this article applies
-
Date Release Apr 13, 2023 10.0.0.0 Mar 13, 2023 | Mar 20, 2023 9.0.0.0 | 9.0.0.1 Feb 13, 2023 8.0.0.0 Jan 12, 2023 7.0.0.0 Releases Prior to 2023 Major Release All Sub Releases 6.0 6.0.0.0, 6.0.1.0, 6.0.1.1, 6.0.2.0, 6.0.2.1, 6.0.3.0, 6.0.3.1, 6.0.4.0, 6.0.4.1, 6.0.4.2, 6.0.5.0, 6.0.6.0, 6.0.6.1, 6.0.7.0, 6.0.8.0, 6.0.8.1, 6.0.9.0, 6.0.10.0, 6.0.10.1, 6.0.11.0, 6.0.12.0, 6.0.12.1, 6.0.13.0, 6.0.13.1, 6.0.14.0, 6.0.15.0, 6.0.16.0, 6.0.17.0, 6.0.17.1, 6.0.17.2
5.3
5.3.0.0, 5.3.0.1, 5.3.0.2, 5.3.0.3, 5.3.1.0, 5.3.1.1, 5.3.1.2, 5.3.2.0, 5.3.3.0, 5.3.3.1, 5.3.4.0, 5.3.5.0, 5.3.6.0, 5.3.7.0, 5.3.7.1, 5.3.8.0, 5.3.8.1, 5.3.9.0 5.2
5.2.2.0, 5.2.2.1, 5.2.3.0, 5.2.4.0, 5.2.5.0, 5.2.5.1, 5.2.6.0, 5.2.6.1
5.1
5.1.0.0, 5.1.1.0, 5.1.2.0, 5.1.3.0, 5.1.4.0, 5.1.5.0, 5.1.5.1, 5.1.6.0, 5.1.7.0, 5.1.8.0, 5.1.8.1, 5.1.9.0, 5.1.10.0
5.0
5.0.1.0, 5.0.1.1, 5.0.2.0, 5.0.2.1, 5.0.2.2, 5.0.2.3, 5.0.3.0, 5.0.3.1, 5.0.4.0, 5.0.4.1, 5.0.5.0, 5.0.5.1, 5.0.5.2, 5.0.5.3, 5.0.5.4
Log Collection
Follow these steps in order to collect the logs as requested by the Customer Support Engineering assisting on your case specific to the use of the Db2 plugin with the Delphix Continuous Data engine.
If requested to collect plugin, connector, and/or db2diag.log files, it's easier to create a folder to place the various archives and logs, and then archive that folder to upload to the case.
It is best to start with a directory to put the various logs in. In this article this folder will be:
/tmp/db2_logs
After you are finished generating the log archives simply archive this folder:
[deladm@pbhrh78db2t2 pbh70]$ ls -lart /tmp/db2_logs total 6092 -rw-r--r--. 1 deladm db2iadm1 225837 Oct 16 20:55 db2_plugin_logs.tar.gz -rw-r--r--. 1 deladm db2iadm1 5996450 Oct 16 21:07 db2_connector_logs.tar.gz drwxr-xr-x. 2 deladm db2iadm1 88 Oct 16 21:09 . -rw-r--r--. 1 deladm db2iadm1 8125 Oct 16 21:09 db2diag.log drwxrwxrwt. 17 root root 4096 Oct 16 21:11 .. [deladm@pbhrh78db2t2 pbh70]$ cd /tmp [deladm@pbhrh78db2t2 tmp]$ tar cvfz db2_logs.tar.gz db2_logs db2_logs/ db2_logs/db2_plugin_logs.tar.gz db2_logs/db2_connector_logs.tar.gz db2_logs/db2diag.log [deladm@pbhrh78db2t2 tmp]$ ls -lart db2_logs.tar.gz -rw-r--r--. 1 deladm db2iadm1 5606327 Oct 16 21:13 db2_logs.tar.gz
Db2 Plugin Diagnostic Logs
In most cases you will be required to provide these logs. If there is specific reasons for further diagnostics you may be requested to provide the following logs.
On the target host the Db2 plugin diagnostics logs are located in the plugin directory setup on the Db2 target host.
To obtain your specific plugin directory, you can check your target Db2 host environment attributes from the UI.
- Locate the environment:
- From the Details tab, scroll down the list of Attributes until you find "Toolkit Path":
- Collect the Delphix engine UUID from the UI.
- Open the "About" menu and look for the "Server ID":
In the example above take the last segment of that ID, "44fd7aaaa300". - This is used to help identify the Delphix_COMMON folder containing plugin scripts and the diagnostic logs you will obtain.
- Login to the target host as a user who will have sufficient access to this directory and sub-directories below it.
In this example, go to the plugin directory obtained known as "/work/pbh70":
[deladm@pbhrh78db2t2 pbh70]$ ls -lart total 0 drwxrwxrwx. 9 deladm db2iadm1 123 Oct 10 18:52 .. drwxrwx---. 5 deladm db2iadm1 44 Oct 10 18:54 Delphix_44fd7aaaa300_10b028725616_39_host drwxrwxr-x. 8 deladm db2iadm1 124 Oct 10 18:54 Delphix_COMMON_44fd7aaaa300_10b028725616_host drwxrwxr-x. 3 deladm db2iadm1 18 Oct 10 18:55 DB2 drwxrwx---. 5 auto1113 db2iadm1 44 Oct 10 18:56 Delphix_44fd7aaaa300_10b028725616_40_host drwxrwx---. 5 auto1115 db2iadm1 44 Oct 10 18:56 Delphix_44fd7aaaa300_10b028725616_41_host drwxrwx---. 5 auto1114 db2iadm1 44 Oct 11 11:31 Delphix_44fd7aaaa300_10b028725616_42_host drwxrwxr-x. 8 deladm db2iadm1 266 Oct 16 19:01 .
- Change to the directory Delphix_COMMON_44fd7aaaa300_10b028725616_host.
- Next, cd plugin/DB2_18f4ff11-b758-4bf2-9a37-719a22f5a4b8/.
There is a directory for each environment user for this host environment under the logs sub-directory.
Depending on the nature of the case you may be instructed to collect all the logs directories or just one of them (so if there is a VDB provision issue, you might be instructed to collect logs from one of the VDB instance users).
In this example we will collect all the sub-directories under logs.
[deladm@pbhrh78db2t2 DB2_18f4ff11-b758-4bf2-9a37-719a22f5a4b8]$ pwd /work/pbh70/Delphix_COMMON_44fd7aaaa300_10b028725616_host/plugin/DB2_18f4ff11-b758-4bf2-9a37-719a22f5a4b8 [deladm@pbhrh78db2t2 DB2_18f4ff11-b758-4bf2-9a37-719a22f5a4b8]$ ls db2_plugin.conf logs [deladm@pbhrh78db2t2 DB2_18f4ff11-b758-4bf2-9a37-719a22f5a4b8]$ tar cfvz /tmp/db2_logs/db2_plugin_logs.tar.gz logs drwxrwxr-x deladm/db2iadm1 0 2023-10-11 11:33 logs/ drwxrwxr-x deladm/db2iadm1 0 2023-10-10 18:55 logs/deladm/ -rw-r--r-- deladm/db2iadm1 1290 2023-10-11 11:47 logs/deladm/diag.log drwxrwxr-x auto1113/db2iadm1 0 2023-10-13 10:10 logs/auto1113/ drwxr-xr-x auto1113/db2iadm1 0 2023-10-13 06:32 logs/auto1113/auto1113/ -rw-r--r-- auto1113/db2iadm1 1048650 2023-10-13 10:10 logs/auto1113/TEST.diag.log.1 -rw-r--r-- auto1113/db2iadm1 554204 2023-10-16 19:21 logs/auto1113/TEST.diag.log drwxrwxr-x auto1115/db2iadm1 0 2023-10-12 22:15 logs/auto1115/ drwxr-xr-x auto1115/db2iadm1 0 2023-10-11 06:30 logs/auto1115/auto1115/ -rw-r--r-- auto1115/db2iadm1 308 2023-10-11 11:34 logs/auto1115/VTEST.CONNECT_PROC.sql -rw-r--r-- auto1115/db2iadm1 645 2023-10-11 11:34 logs/auto1115/VTEST.CONNECT_PROC.sql.log -rw-r--r-- auto1115/db2iadm1 1048604 2023-10-12 22:15 logs/auto1115/VTEST.diag.log.1 -rw-r--r-- auto1115/db2iadm1 445501 2023-10-16 19:21 logs/auto1115/VTEST.diag.log drwxrwxr-x auto1114/db2iadm1 0 2023-10-13 13:25 logs/auto1114/ drwxr-xr-x auto1114/db2iadm1 0 2023-10-11 11:34 logs/auto1114/auto1114/ -rw-r--r-- auto1114/db2iadm1 1048768 2023-10-13 13:25 logs/auto1114/VTESTE.diag.log.1 -rw-r--r-- auto1114/db2iadm1 127486 2023-10-16 19:21 logs/auto1114/VTESTE.diag.log
This archive can now be uploaded to the Support case.
If you need a specific sub-directory or sub-directories, modify the tar command.
For example, if deladm and auto1115 are requested:
[deladm@pbhrh78db2t2 DB2_18f4ff11-b758-4bf2-9a37-719a22f5a4b8]$ pwd /work/pbh70/Delphix_COMMON_44fd7aaaa300_10b028725616_host/plugin/DB2_18f4ff11-b758-4bf2-9a37-719a22f5a4b8 [deladm@pbhrh78db2t2 DB2_18f4ff11-b758-4bf2-9a37-719a22f5a4b8]$ cd logs [deladm@pbhrh78db2t2 logs]$ pwd /work/pbh70/Delphix_COMMON_44fd7aaaa300_10b028725616_host/plugin/DB2_18f4ff11-b758-4bf2-9a37-719a22f5a4b8/logs [deladm@pbhrh78db2t2 logs]$ tar cvfz /tmp/db2_logs/db2_plugin_logs.tar.gz deladm auto1115 deladm/ deladm/diag.log auto1115/ auto1115/auto1115/ auto1115/VTEST.CONNECT_PROC.sql auto1115/VTEST.CONNECT_PROC.sql.log auto1115/VTEST.diag.log.1 auto1115/VTEST.diag.log
Db2 Database Error Log known as db2diag.log
By default the db2diag.log is located under the Db2 instance home directory.
If the instance user name is auto1115 the db2diag.log is located:
db2 get dbm cfg | grep DIAGPATH
Example:
[auto1151@pbhrh78db2t2 ~]$ pwd /home/auto1151 [auto1151@pbhrh78db2t2 ~]$ echo $HOME /home/auto1151 [auto1151@pbhrh78db2t2 ~]$ db2 get dbm cfg |grep DIAGPATH Diagnostic data directory path (DIAGPATH) = /home/auto1151/sqllib/db2dump/ $m Current member resolved DIAGPATH = /home/auto1151/sqllib/db2dump/DIAG0000/ Alternate diagnostic data directory path (ALT_DIAGPATH) = Current member resolved ALT_DIAGPATH
Use the Current member resolved DIAGPATH location:
[auto1151@pbhrh78db2t2 ~]$ ls -lart /home/auto1151/sqllib/db2dump/DIAG0000/ total 8 drwxrwsrwt. 3 auto1151 db2iadm1 22 Oct 19 2020 .. drwxrwxrwt. 2 auto1151 db2iadm1 25 Oct 19 2020 . -rw-rw-rw-. 1 auto1151 db2iadm1 8125 Oct 19 2020 db2diag.log
In this specific example the diag file is under the DIAG0000 sub-directory.
Collect the file and upload to the case.
Copy db2diag.log to /tmp/db2_logs/db2diag.log
One might encounter permission issue in the copy depending on how the /tmp/db2_logs directory is created. In these examples the Db2 host environment OS user is performing the work, so example of copy can be like this:
[deladm@pbhrh78db2t2 pbh70]$ cp /home/auto1151/sqllib/db2dump/DIAG0000/db2diag.log /tmp/db2_logs/.
Db2 Delphix Connector Logs from Plugin Directories
Under rare occasions you may be asked to provide the Db2 connector logs.
The Support Engineer will provide the specific directory or directories.
As an example, this sequence is to collect the connector logs from one of the instance users, located under %plugin_folder%/Delphix_44fd7aaaa300_10b028725616_40_host/, where %plugin_folder% is the plugin directory specified under the environment details. Please note in the example below that the argument to the tar command for the source files is Delphix_44fd7aaaa300_10b028725616_40_host/log.
[deladm@pbhrh78db2t2 pbh70]$ ls -lart total 0 drwxrwxrwx. 9 deladm db2iadm1 123 Oct 10 18:52 .. drwxrwx---. 5 deladm db2iadm1 44 Oct 10 18:54 Delphix_44fd7aaaa300_10b028725616_39_host drwxrwxr-x. 8 deladm db2iadm1 124 Oct 10 18:54 Delphix_COMMON_44fd7aaaa300_10b028725616_host drwxrwxr-x. 3 deladm db2iadm1 18 Oct 10 18:55 DB2 drwxrwx---. 5 auto1113 db2iadm1 44 Oct 10 18:56 Delphix_44fd7aaaa300_10b028725616_40_host drwxrwx---. 5 auto1115 db2iadm1 44 Oct 10 18:56 Delphix_44fd7aaaa300_10b028725616_41_host drwxrwx---. 5 auto1114 db2iadm1 44 Oct 11 11:31 Delphix_44fd7aaaa300_10b028725616_42_host drwxrwxr-x. 8 deladm db2iadm1 266 Oct 16 19:01 . [deladm@pbhrh78db2t2 pbh70]$ tar cvfz /tmp/db2_logs/db2_connector_logs.tar.gz Delphix_44fd7aaaa300_10b028725616_40_host/log Delphix_44fd7aaaa300_10b028725616_40_host/log/ Delphix_44fd7aaaa300_10b028725616_40_host/log/connector/ Delphix_44fd7aaaa300_10b028725616_40_host/log/connector/trace.log Delphix_44fd7aaaa300_10b028725616_40_host/log/connector/error.log Delphix_44fd7aaaa300_10b028725616_40_host/log/connector/stdout.log Delphix_44fd7aaaa300_10b028725616_40_host/log/connector/stderr.log Delphix_44fd7aaaa300_10b028725616_40_host/log/connector/debug.log.6 Delphix_44fd7aaaa300_10b028725616_40_host/log/connector/debug.log.4 Delphix_44fd7aaaa300_10b028725616_40_host/log/connector/debug.log.2 Delphix_44fd7aaaa300_10b028725616_40_host/log/connector/debug.log Delphix_44fd7aaaa300_10b028725616_40_host/log/connector/info.log.5 Delphix_44fd7aaaa300_10b028725616_40_host/log/connector/info.log.4 Delphix_44fd7aaaa300_10b028725616_40_host/log/connector/info.log.3 Delphix_44fd7aaaa300_10b028725616_40_host/log/connector/info.log.2 Delphix_44fd7aaaa300_10b028725616_40_host/log/connector/info.log.1 Delphix_44fd7aaaa300_10b028725616_40_host/log/connector/info.log Delphix_44fd7aaaa300_10b028725616_40_host/log/connector/debug.log.10 Delphix_44fd7aaaa300_10b028725616_40_host/log/connector/debug.log.9 Delphix_44fd7aaaa300_10b028725616_40_host/log/connector/debug.log.8 Delphix_44fd7aaaa300_10b028725616_40_host/log/connector/debug.log.7 Delphix_44fd7aaaa300_10b028725616_40_host/log/connector/debug.log.5 Delphix_44fd7aaaa300_10b028725616_40_host/log/connector/debug.log.3 Delphix_44fd7aaaa300_10b028725616_40_host/log/connector/debug.log.1
Related Articles
The following articles may provide more information or related information to this article:
- Using db2 command to locate db2diag.log files: