Skip to main content
Common Reference

tpm diag

The tpm diag command will create a TGZ file including log files, current dataservice status and a number of OS metrics.

Usage
tpm diag [args]

Where:

OptionDescriptionVersion
--allhosts
Aliases: -a
Gather diags for all hosts listed in the configuration.
--apiUse the v2 API REST interface instead of the command line when possible.7.0.0
--debug
Aliases: -d
Displays debug-level status messages.
--force
Aliases: -f
Force 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.7.0.0
--help
Aliases: -h
--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.7.0.0
--info
Aliases: -i
Displays info-level status messages.
--listPrint all diagnostic gathering groups and associated subroutines for use with --include,--groups, --skip and --skipgroups.
--local
Aliases: -l
Limit to this node only when deployed using the Staging method, because by default all hosts will be gathered.
--log-limit
Aliases: -L
Specify the quantity of log files to gather (default: unlimited).
--password
Aliases: --pass-p
Specify API auth password (default: not defined)7.0.0
--path
Aliases: -p
Pass full path to replicator executables e.g. --path /opt/replicator/tungsten/tungsten-replicator/bin
--quiet
Aliases: -q
Hides 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)
--skipsudo
Aliases: --nosudo
Do not use the sudo command; will not be able to gather root-owned resources in getOSCommands and mysqlErrorLog.7.1.0
--thlPath and name of thl executable (Ignores --path if also supplied)
--trepctlPath and name of trepctl executable (Ignores --path if also supplied)
--user
Aliases: -us
Specify API auth user (default: not defined)7.0.0
-vDisplays verbose-level status messages.7.0.3

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 "The tungsten_send_diag Command"