dbdiag
This command collects diagnostic data.
As a user with host operating system root authority, issue the list or collect version of the command, as described in the following sections. You can issue the command on any node.
List the components, symptoms, or component sets
docker exec -it Db2wh dbdiag list {{--components | --symptoms | --sets} [--system-type {Local|Appliance] | -h | --help}podman exec -it Db2wh dbdiag list {{--components | --symptoms | --sets} [--system-type {Local|Appliance] | -h | --help}If
you do not specify any parameters for the docker exec -it Db2wh dbdiag list
podman exec -it Db2wh dbdiag list or command, all components, symptoms, and
component sets are listed. - --components
- Lists all the components with their subcomponents. For example, database/uptime is an example of a component (database) and subcomponent (uptime).
- --symptoms
- Lists all the symptoms, such as crash and outofmemory.
- --sets
- Lists all the component sets. A component set is a group of components that are frequently used together to accomplish a task. For example, the ha_logs component set contains logs from different components that are useful for investigating HA issues.
- --system-type {Local|Appliance}
- Specifies the system type. This parameter is required only if this command is unable to
automatically detect the system type.
- Local
- IBM® Db2® Warehouse.
- Appliance
- Integrated Analytics System.
- -h|--help
- Displays help for the command.
Collect diagnostic data
docker exec -it Db2wh dbdiag collect
{--components { all | '*' | component [component...]} |
--symptoms symptom [symptom...] |
--sets set [set...] |
--comp-file compfile}
[--minus-components component [component...]]
[--skip-secure-data] [--nodes node [node...]]
[--headnode headnode]
[--datanodes datanode [datanode...]]
[--dumpdir dump_directory]
[--suffix suffix]
[--system-type {Local|Appliance}]
docker exec -it Db2wh dbdiag collect {-h | --help}podman exec -it Db2wh dbdiag collect
{--components { all | '*' | component [component...]} |
--symptoms symptom [symptom...] |
--sets set [set...] |
--comp-file compfile}
[--minus-components component [component...]]
[--skip-secure-data] [--nodes node [node...]]
[--headnode headnode]
[--datanodes datanode [datanode...]]
[--dumpdir dump_directory]
[--suffix suffix]
[--system-type {Local|Appliance}]
podman exec -it Db2wh dbdiag collect {-h | --help}- --components {all|'*'|component [component...]}
- Specifies whether to collect data for all components (if you specify all or '*') or for one or more specific components. You can specify the component name with or without a subcomponent name. For example, you can specify database to collect data about all subcomponents of the database component or specify database/uptime to collect information for just the uptime subcomponent. You cannot specify a subcomponent name alone (for example, uptime). Separate each component name with a space.
- --symptoms symptom [symptom...]
- Specifies one or more symptoms for which to collect data. Separate each symptom name with a space.
- --sets set [set...]
- Specifies one or more component sets for which to collect data. Separate each component set name with a space.
- --comp-file compfile
- Specifies a file that contains a list of components for which to collect data. Specify each component on a separate line in the file.
- --minus-components component [component...]
- Specifies one or more components (such as database) or subcomponents (such as database/uptime) to omit when collecting data. Separate each component name with a space.
- --skip-secure-data
- Specifies that components that contain secure data will not be included in data collection. The log file indicates which components were not included in data collection.
- --nodes node [node...]
- Specifies the names of one or more nodes. This parameter is required in two cases:
- If you want to run the command against a subset of nodes. By default, the command runs against all nodes.
- If you want to run the command against all nodes but the nodes and their roles cannot be automatically detected, which results in an error. Rerun the command with the --nodes, --headnode, and --datanodes parameters.
For the node values, use the names (not the IP addresses) that you specified in the /mnt/clusterfs/nodes file. Separate each node name with a space.
- --headnode headnode
- Specifies the name of the head node. This parameter is required only if you want to run the
command against the head node but it cannot be automatically detected, which results in an error.
Rerun the command with the --headnode and --nodes
parameters.
For the headnode value, use the name (not the IP address) that you specified in the /mnt/clusterfs/nodes file.
- --datanodes datanode [datanode...]
- Specifies the names of one or more data nodes. This parameter is required only if you want to
run the command against data nodes but they cannot be automatically detected, which results in an
error. Rerun the command with the --datanodes and --nodes
parameters.
For the datanode values, use the names (not the IP addresses) that you specified in the /mnt/clusterfs/nodes file. Separate each node name with a space.
- --dumpdir dump_directory
- Specifies the name of the dump directory. The default directory name is
mount_point/scratch/dbdiag/dump, such as
/mnt/clusterfs/scratch/dbdiag/dump.
The output and logs that are specific to the components for which you requested information, plus general output and logs for the dbdiag command, are written to a subdirectory of the dump directory. The subdirectory name contains the time stamp. The contents of the subdirectory are also written to a .tgz file, which is written to the dump directory.
- --suffix [suffix]
- Specifies a suffix to append to the name of the .tgz file to make it easier to identify. The name of the .tgz file is timestamp_pid_optionalsuffix.tgz. An example is 20171010_121253_10740_pmr1234.tgz, where pmr1234 is the suffix.
- --system-type {Local|Appliance}
- Specifies the system type. This parameter is required only if it is not possible to
automatically detect the system type, which results in an error. The system types are:
- Local
- IBM Db2 Warehouse.
- Appliance
- Integrated Analytics System.
- -h|--help
- Displays help for the command.
Examples for Docker or Podman
- List all the symptoms:
docker exec -it Db2wh dbdiag list --symptomspodman exec -it Db2wh dbdiag list --symptoms - Collect information for all the subcomponents of the host and
network components and for the uptime subcomponent of the
database component:
docker exec -it Db2wh dbdiag collect --components host network database/uptimepodman exec -it Db2wh dbdiag collect --components host network database/uptime - Collect information for all the components on only head node Db2Wh001 when the role of the node
can be automatically detected:
docker exec -it Db2wh dbdiag collect --components all --nodes Db2Wh001podman exec -it Db2wh dbdiag collect --components all --nodes Db2Wh001 - Collect information for all the components on only head node Db2Wh001 when the role of the node
cannot be automatically
detected:
docker exec -it Db2wh dbdiag collect --components all --nodes Db2Wh001 --headnode Db2Wh001podman exec -it Db2wh dbdiag collect --components all --nodes Db2Wh001 --headnode Db2Wh001 - Collect information about the hang symptom for all components except for
the database
component:
docker exec -it Db2wh dbdiag collect --symptoms hang --minus-components databasepodman exec -it Db2wh dbdiag collect --symptoms hang --minus-components database