10.5.7. tpm diag Command

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 10.7. tpm diag Common Options

OptionDescription
--allhosts, -aGather diags for all hosts listed in the configuration
--apiUse the v2 API REST interface instead of the command line when possible
-p, --pass, --passwordSpecify API auth password (default: not defined)
-us, --userSpecify API auth user (default: not defined)
--debug, -dDisplays debug-level status messages
--force, -fForce hosts not listed in the configuration to be used, used with --hosts
--groupsSpecify a comma-separated list of subroutine groups to include (NO spaces). Anything not listed will be skipped.
--help, -hDisplays a help message
--hostsSpecify a comma-separated list of hosts to act upon (NO spaces)
--includeSpecify a comma-separated list of subroutines to include (NO spaces). Anything not listed will be skipped.
--info, -iDisplays info-level status messages
--listPrint all diagnostic gathering groups and associated subroutines for use with --include, --groups, --skip and --skipgroups
--local, -lLimit to this node only when deployed using the Staging method, because by default all hosts will be gathered.
-L, --log-limitSpecify the quantity of log files to gather (default: unlimited).
--path, -pPass full path to replicator executables e.g. --path /opt/replicator/tungsten/tungsten-replicator/bin
--quiet, -qHides status output whenever possible
--skipSpecify a comma-separated list of subroutines to skip (NO spaces)
--skipgroupsSpecify a comma-separated list of subroutine groups to skip (NO spaces)
--thlPath and name of thl executable (Ignores --path if also supplied)
--trepctlPath and name of trepctl executable (Ignores --path if also supplied)
-vDisplays 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 9.38, “The tungsten_send_diag Script”