You can gather data about the Red Hat®
OpenShift cluster where your Db2
service runs, and database-specific information, by using the OpenShift must-gather utility.
About this task
When you open a support case, it is helpful to provide debugging information about your cluster.
The must-gather utility collects data at the cluster level about pods, custom resources, persistent
volumes, and logs, and also runs Db2 scripts to gather logs that are specific to a
database deployment.
Procedure
-
Retrieve the must-gather image from an OpenShift cluster where Db2 is
installed:
- Run the following command to identify which version of Db2 you are
using:
oc get Db2uCluster -n ${PROJECT_CPD_INST_OPERANDS} -o jsonpath='{range .items[*]}{.metadata.name}: {.status.version}{"\n"}{end}'
Refer
to the following example output:
db2oltp-1732155024807900: 11.5.8.0-cn6
db2u-dv: 11.5.8.0-cn6
- Set APP_VERSION to your deployed version of Db2:
export APP_VERSION=<DB2_VERSION>
Replace
<
DB2_VERSION> with your deployed version of
Db2.
- Run the following command to retrieve the must-gather image:
MUST_GATHER_IMAGE=$(oc get cm db2u-release -n ${PROJECT_CPD_INST_OPERATORS} -o=jsonpath='{.data.json}' | jq ".databases.db2u.\"$APP_VERSION\".images.mustgather")
- Ensure the image name is set by running the following command:
-
Use the following command to create a must-gather deployment:
oc adm must-gather --image $MUST_GATHER_IMAGE -- gather -n ${PROJECT_CPD_INST_OPERANDS}
What to do next
For details on using the must-gather utility, see Gathering data about your cluster in the OpenShift documentation.
You can view all of the available options for the utility by running this command:
oc adm must-gather --image $MUST_GATHER_IMAGE -- gather -h
The utility creates a local directory to store the data that it collects.