gcloud alpha storage diagnose

NAME
gcloud alpha storage diagnose - diagnose Google Cloud Storage
SYNOPSIS
gcloud alpha storage diagnose URL [--test-type=[TEST_TYPES,…]] [--download-type=DOWNLOAD_TYPE; default=<DownloadType.FILE: 'FILE'>] [--upload-type=UPLOAD_TYPE; default=<UploadType.FILE: 'FILE'>] [--process-count=PROCESS_COUNT] [--thread-count=THREAD_COUNT] [--object-count=OBJECT_COUNT (--object-size=OBJECT_SIZE | --object-sizes=[OBJECT_SIZES,…])] [--export : --destination=DESTINATION] [GCLOUD_WIDE_FLAG]
DESCRIPTION
(ALPHA) The diagnose command runs a series of diagnostic tests for common gcloud storage issues.

The URL argument must name an exisiting bucket for which the user already has write permissions. Standard billing also applies. Several test files/objects will be uploaded and downloaded to this bucket to gauge out the performance metrics. All the temporary files will be deleted on successfull completion of the command.

By default, the command executes DOWNLOAD_THROUGHPUT, UPLOAD_THROUGHPUT and LATENCY tests. Tests to execute can be overriden by using the --test-type flag. Each test uses the command defaults or gcloud CLI configurations for performing the operations. This command also provides a way to override these values via means of different flags like --process-count, --thread-count, --download-type, etc.

The command outputs a diagnostic report with sytem information like free memory, available CPU, average CPU load per test, disk counter deltas and diagnostic information specific to individual tests on successful completion.

EXAMPLES
The following command runs the default diagnostic tests on my-bucket bucket:
gcloud alpha storage diagnose gs://my-bucket

The following command runs only UPLOAD_THROUGHPUT and DOWNLOAD_THROUGHPUT diagnostic tests:

gcloud alpha storage diagnose gs://my-bucket --test-type=[UPLOAD_THROUGHPUT,DOWNLOAD_THROUGHPUT]

The following command runs the diagnostic tests using 10 objects of 1MiB size each with 10 threads and 10 processes at max:

gcloud alpha storage diagnose gs://my-bucket --no-of-objects=10 --object-size=1MiB --process-count=10 --thread-count=10

The following command can be used to bundle and export the diagnostic information to a user defined PATH destination:

gcloud alpha storage diagnose gs://my-bucket --export --destination=<PATH>
POSITIONAL ARGUMENTS
URL
Bucket URL to use for the diagnostic tests.
FLAGS
--test-type=[TEST_TYPES,…]
Tests to run as part of this diagnosis. Following tests are supported:

DOWNLOAD_THROUGHPUT: Upload objects to the specified bucket and record the number of bytes transfered per second.

UPLOAD_THROUGHPUT: Download objects from the specified bucket and record the number of bytes transfered per second.

LATENCY: Writes the objects, retrieves its metadata, reads the objects and records latency of each operation.

TEST_TYPES must be one of: DOWNLOAD_THROUGHPUT, LATENCY, UPLOAD_THROUGHPUT.

--download-type=DOWNLOAD_TYPE; default=<DownloadType.FILE: 'FILE'>
Download strategy to use for the DOWNLOAD_THROUGHPUT diagnostic test.

STREAMING: Downloads the file in memory, does not use parallelism. --process-count and --thread-count flag values will be ignored if provided.

SLICED: Performs a sliced download of objects to a directory. Parallelism can be controlled via --process-count and --thread-count flags.

FILE: Download objects as files. Parallelism can be controlled via --process-count and --thread-count flags.

DOWNLOAD_TYPE must be one of: FILE, SLICED, STREAMING.

--upload-type=UPLOAD_TYPE; default=<UploadType.FILE: 'FILE'>
Upload strategy to use for the UPLOAD_THROUGHPUT diagnostic test.

FILE: Uploads files to a bucket. Parallelism can be controlled via --process-count and --thread-count flags.

PARALLEL_COMPOSITE: Uploads files using a parallel composite strategy. Parallelism can be controlled via --process-count and --thread-count flags.

STREAMING: Streams the data to the bucket, does not use parallelism. --process-count and --thread-count flag values will be ignored if provided.

UPLOAD_TYPE must be one of: FILE, PARALLEL_COMPOSITE, STREAMING.

--process-count=PROCESS_COUNT
Number of processes at max to use for each diagnostic test.
--thread-count=THREAD_COUNT
Number of threads at max to use for each diagnostic test.
Object properties:
--object-count=OBJECT_COUNT
Number of objects to use for each diagnostic test.

This flag argument must be specified if any of the other arguments in this group are specified.

Object size properties:

Exactly one of these must be specified:

--object-size=OBJECT_SIZE
Object size to use for the diagnostic tests.
--object-sizes=[OBJECT_SIZES,…]
List of object sizes to use for the tests. Sizes should be provided for each object specified using --object-count flag.
Export diagnostic bundle.
--export
Generate and export a diagnostic bundle. The following information will be bundled and exported into a gzipped tarball (.tar.gz):
  • Latest gcloud CLI logs.
  • Output of running the gcloud storage diagnose command.
  • Output of running the gcloud info --anonymize command.

Note: This command generates a bundle containing system information like disk counter detlas, CPU information and system configurations. Please exercise caution while sharing.

This flag argument must be specified if any of the other arguments in this group are specified.

--destination=DESTINATION
Destination file path where the diagnostic bundle will be exported.
GCLOUD WIDE FLAGS
These flags are available to all commands: --access-token-file, --account, --billing-project, --configuration, --flags-file, --flatten, --format, --help, --impersonate-service-account, --log-http, --project, --quiet, --trace-token, --user-output-enabled, --verbosity.

Run $ gcloud help for details.

NOTES
This command is currently in alpha and might change without notice. If this command fails with API permission errors despite specifying the correct project, you might be trying to access an API with an invitation-only early access allowlist.