gcloud alpha storage diagnose URL [--test-type=[TEST_TYPES,…]] [--download-type=DOWNLOAD_TYPE; default=<DownloadType.FILE: 'FILE'>] [--logs-path=LOGS_PATH] [--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 …]
(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.
my-bucket bucket:
gcloud alpha storage diagnose gs://my-bucketThe 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
objects of
10 size each with
1MiB threads and
10 processes at max:
10
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
destination:
PATH
gcloud alpha storage diagnose gs://my-bucket --export --destination=<PATH>URL--test-type=[TEST_TYPES,…]DIRECT_CONNECTIVITY: Run a test upload over the Direct Connectivity network path and run other diagnostics if the upload fails.
DOWNLOAD_THROUGHPUT: Upload objects to the specified bucket and record the number of bytes transferred per second.
UPLOAD_THROUGHPUT: Download objects from the specified bucket and record the number of bytes transferred per second.
LATENCY: Write the objects, retrieve their metadata, read the objects, and record latency of each operation.
TEST_TYPES must be one of:
DIRECT_CONNECTIVITY, DOWNLOAD_THROUGHPUT,
LATENCY, UPLOAD_THROUGHPUT.
--download-type=DOWNLOAD_TYPE; default=<DownloadType.FILE: 'FILE'>
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.
--logs-path=LOGS_PATH--upload-type=UPLOAD_TYPE; default=<UploadType.FILE: 'FILE'>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--thread-count=THREAD_COUNT--object-count=OBJECT_COUNT--object-size=OBJECT_SIZE--object-sizes=[OBJECT_SIZES,…]--object-count flag.
--exportgcloud storage diagnose
command.
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--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.
gcloud storage diagnose
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-05-27 UTC.