The tpm diag command will create a TGZ file including log files, current dataservice status and a number of OS metrics.
shell> tpm diag
db1|Diagnostic information written to /home/tungsten/tungsten-diag-2025-03-04-14-25-56.tgz
Table 9.21. tpm diag Common Options
Option | Description |
---|---|
--allhosts , -a | Gather diags for all hosts listed in the configuration |
--api | Use the v2 API REST interface instead of the command line when possible |
-p , --pass , --password | Specify API auth password (default: not defined) |
-us , --user | Specify API auth user (default: not defined) |
--debug , -d | Displays debug-level status messages |
--force , -f | Force hosts not listed in the configuration to be used, used with --hosts |
--groups | Specify a comma-separated list of subroutine groups to include (NO spaces). Anything not listed will be skipped. |
--help , -h | Displays a help message |
--hosts | Specify a comma-separated list of hosts to act upon (NO spaces) |
--include | Specify a comma-separated list of subroutines to include (NO spaces). Anything not listed will be skipped. |
--info , -i | Displays info-level status messages |
--list | Print all diagnostic gathering groups and associated subroutines for use with --include, --groups, --skip and --skipgroups |
--local , -l | Limit to this node only when deployed using the Staging method, because by default all hosts will be gathered. |
-L , --log-limit | Specify the quantity of log files to gather (default: unlimited). |
--path , -p | Pass full path to replicator executables e.g. --path /opt/replicator/tungsten/tungsten-replicator/bin |
--quiet , -q | Hides status output whenever possible |
--skip | Specify a comma-separated list of subroutines to skip (NO spaces) |
--skipgroups | Specify a comma-separated list of subroutine groups to skip (NO spaces) |
--thl | Path and name of thl executable (Ignores --path if also supplied) |
--trepctl | Path and name of trepctl executable (Ignores --path if also supplied) |
-v | Displays verbose-level status messages. |
The operation of tpm diag differs between installation types (Staging vs INI). This is outlined below:
The tpm diag command can be issued in two ways:
For an INI based installation, the tpm diag command alone will ONLY obtain diagnostics from the local host on which the command is executed.
For an Staging based installation, the tpm diag command alone will obtain diagnostics all hosts configured within the topology.
Use of the --hosts
option
will obtain diagnostics from the specified host(s) only, e.g:
shell> tpm diag --hosts db1,db2
The -a
(or --allhosts
)
option will attempt to obtain diagnostics from all hosts in the cluster if
ssh has been configured and the other hosts
can be reached. The output of tpm diag will
provide feedback detailing the hosts that were reached.
The structure of the created file will depend on the configured hosts, but will include all the logs for each accessible host configured in individual directories for each host.
Using additional options
It is possible to limit the amount of information gathered by tpm
diag by optionally skipping individual gather subroutines, or
skipping entire groups by using --include
(v7+ only),
--skip
, --group
(v7+ only),
--skipgroups
or --skipsudo
(v7.1+ only)
To see a list of the various groups and subroutines for use with these options, execute with the
--list
option, for example:
Examples
shell> tpm diag --list
GROUP: SUBROUTINE(s)
cluster: cctrlClusterValidate cctrlClusterTopologyValidate cctrlHistoryFile cctrlLong cctrlPing cctrlStatus
general: confDirs logFiles miscFiles
mysql: etcMysql etcMycnf etcMyInclude etcMyIncludedirs getMysqlCommands mysqlErrorLog
os: getOSCommands etcHosts cpuInfo etcSystemRelease etcOSRelease usrlibOSRelease
replicator: thlInfo thlIndex trepctlPerf trepctlQuick trepctlStatus trepctlStatusJSON
tpm: etcTungsten tpmDiff tpmReverse tpmValidate tpmAskSummary
shell> tpm diag --skip=getOSCommands
shell> tpm diag --skipgroups=os
tungsten_send_diag
If the host you are running the diag from has external internet connectivity, you may also wish to consider using tungsten_send_diag. This will run tpm diag for you and automatically upload the resulting file to Continuent Support. For more information on using this, see Section 8.33, “The tungsten_send_diag Script”