The cockroach debug list-files shows the files that will be collected by using .
The files listed include logs, heap profiles, goroutine dumps, and CPU profiles. Other generated by cockroach debug zip are not listed by cockroach debug list-files.
Subcommands
While the cockroach debug command has a few subcommands, users are expected to use only the , , , , , and subcommands.
We recommend using the and subcommands only when directed by the .
The other debug subcommands are useful only to Cockroach Labs. Output of debug commands may contain sensitive or secret information.
Synopsis
Flags
The debug list-files subcommand supports the following general-use, client connection, and logging flags.
General
| Flag | Description |
|---|
--exclude-files | to exclude from the generated .zip. This can be used to limit the size of the generated .zip, and affects logs, heap profiles, goroutine dumps, and/or CPU profiles. The files are specified as a comma-separated list of glob patterns. For example: --exclude-files=\*.log Note that this flag is applied after--include\_files. |
--exclude-nodes | Specify nodes to exclude from inspection as a comma-separated list or range of node IDs. For example: --exclude-nodes=1,10,13-15 |
--files-from | Start timestamp for log file, goroutine dump, and heap profile collection. This can be used to limit the size of the generated .zip, which is increased by these files. The timestamp uses the format YYYY-MM-DD, followed optionally by HH:MM:SS or HH:MM. For example: --files-from='2021-07-01 15:00' When specifying a narrow time window, we recommend adding extra seconds/minutes to account for uncertainties such as clock drift. Default: 48 hours before now |
--files-until | End timestamp for log file, goroutine dump, and heap profile collection. This can be used to limit the size of the generated .zip, which is increased by these files. The timestamp uses the format YYYY-MM-DD, followed optionally by HH:MM:SS or HH:MM. For example: --files-until='2021-07-01 16:00' When specifying a narrow time window, we recommend adding extra seconds/minutes to account for uncertainties such as clock drift. Default: 24 hours beyond now (to include files created during .zip creation) |
--format | Specify a format to display table rows. This can be tsv, csv, table, records, sql, raw, or html. Default:table (interactive sessions), tsv (non-interactive sessions) |
--include-files | to include in the generated .zip. This can be used to limit the size of the generated .zip, and affects logs, heap profiles, goroutine dumps, and/or CPU profiles. The files are specified as a comma-separated list of glob patterns. For example: --include-files=\*.pprof Note that this flag is applied before--exclude-files. |
--nodes | Specify nodes to inspect as a comma-separated list or range of node IDs. For example: --nodes=1,10,13-15 |
Client connection
| Flag | Description |
|---|
--url | A to use instead of the other arguments. To convert a connection URL to the syntax that works with your client driver, run . Env Variable:COCKROACH\_URL Default: no URL |
--host | The server host and port number to connect to. This can be the address of any node in the cluster. Env Variable:COCKROACH\_HOST Default:localhost:26257 |
--port -p | The server port to connect to. Note: The port number can also be specified via --host. Env Variable:COCKROACH\_PORT Default:26257 |
--user -u | The that will own the client session. Env Variable:COCKROACH\_USER Default:root |
--insecure | Use an insecure connection. Env Variable:COCKROACH\_INSECURE Default:false |
--cert-principal-map | A comma-separated list of : mappings. This allows mapping the principal in a cert to a DB principal such as node or root or any SQL user. This is intended for use in situations where the certificate management system places restrictions on the Subject.CommonName or SubjectAlternateName fields in the certificate (e.g., disallowing a CommonName like node or root). If multiple mappings are provided for the same “, the last one specified in the list takes precedence. A principal not specified in the map is passed through as-is via the identity function. A cert is allowed to authenticate a DB principal if the DB principal name is contained in the mapped CommonName or DNS-type SubjectAlternateName fields. |
--certs-dir | The path to the containing the CA and client certificates and client key. Env Variable:COCKROACH\_CERTS\_DIR Default:${HOME}/.cockroach-certs/ |
--cluster-name | The cluster name to use to verify the cluster’s identity. If the cluster has a cluster name, you must include this flag. For more information, see . |
--disable-cluster-name-verification | Disables the cluster name check for this command. This flag must be paired with --cluster-name. For more information, see . |
Logging
While the cockroach debug command has a few subcommands, users are expected to use only the , , , , , and subcommands.
We recommend using the and subcommands only when directed by the .
The other debug subcommands are useful only to Cockroach Labs. Output of debug commands may contain sensitive or secret information.
Examples
List all collected files
The files listed include logs, heap profiles, goroutine dumps, and CPU profiles. Other generated by cockroach debug zip are not listed by cockroach debug list-files.
List all collected log files