Skip to main content
Use the cockroach statement-diag command to manage and download statement diagnostics bundles generated from the DB Console or EXPLAIN ANALYZE (DEBUG).

Required privileges

Only members of the admin role and users with the VIEWSYSTEMTABLE system privilege, which provides read-only access to system tables, can run cockroach statement-diag. By default, the root user belongs to the admin role.

Subcommands

Synopsis

List available statement diagnostics bundles and outstanding activation requests:
Download a specified diagnostics bundle into a .zip file:
Delete a statement diagnostics bundle:
Delete all statement diagnostics bundles:
Cancel an outstanding activation request:
Cancel all outstanding activation requests:

Flags

General

Client connection

See Client Connection Parameters for more details.

Logging

By default, this command logs messages to stderr. This includes events with WARNING severity and higher. If you need to troubleshoot this command’s behavior, you can customize its logging behavior.

Examples

Setup

These examples assume you are running an insecure cluster and have requested and/or generated statement diagnostics bundles using the DB Console or EXPLAIN ANALYZE (DEBUG).

Download a statement diagnostics bundle

List statement diagnostics bundles and/or activation requests:
Download a statement diagnostics bundle to bundle.zip:

Delete all statement diagnostics bundles

Delete all statement diagnostics bundles:

Cancel an activation request

List statement diagnostics bundles and/or activation requests:

Delete an activation request

See also