tpm diag
The tpm diag command will create a TGZ file including log files, current dataservice status and a number of OS metrics.
tpm diag [args]
Where:
| Option | Description | Version |
|---|---|---|
--allhostsAliases: -a | Gather diags for all hosts listed in the configuration. | |
--api | Use the v2 API REST interface instead of the command line when possible. | 7.0.0 |
--debugAliases: -d | Displays debug-level status messages. | |
--forceAliases: -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. | 7.0.0 |
--helpAliases: -h | ||
--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. | 7.0.0 |
--infoAliases: -i | Displays info-level status messages. | |
--list | Print all diagnostic gathering groups and associated subroutines for use with --include,--groups, --skip and --skipgroups. | |
--localAliases: -l | Limit to this node only when deployed using the Staging method, because by default all hosts will be gathered. | |
--log-limitAliases: -L | Specify the quantity of log files to gather (default: unlimited). | |
--password | Specify API auth password (default: not defined) | 7.0.0 |
--pathAliases: -p | Pass full path to replicator executables e.g. --path /opt/replicator/tungsten/tungsten-replicator/bin | |
--quietAliases: -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) | |
--skipsudoAliases: --nosudo | Do not use the sudo command; will not be able to gather root-owned resources in getOSCommands and mysqlErrorLog. | 7.1.0 |
--thl | Path and name of thl executable (Ignores --path if also supplied) | |
--trepctl | Path and name of trepctl executable (Ignores --path if also supplied) | |
--userAliases: -us | Specify API auth user (default: not defined) | 7.0.0 |
-v | Displays 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 diagcommand alone will ONLY obtain diagnostics from the local host on which the command is executed. - For an Staging based installation, the
tpm diagcommand 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"