- NAME
-
- gcloud alpha storage diagnose - diagnose Google Cloud Storage
- SYNOPSIS
-
-
gcloud alpha storage diagnoseURL[--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 …]
-
- DESCRIPTION
-
(ALPHA)The diagnose command runs a series of diagnostic tests for common gcloud storage issues.The
URLargument 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_THROUGHPUTandLATENCYtests. Tests to execute can be overriden by using the--test-typeflag. 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
bucket:my-bucketgcloud 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_THROUGHPUTThe following command runs the diagnostic tests using
objects of10size each with1MiBthreads and10processes at max:10gcloud alpha storage diagnose gs://my-bucket --no-of-objects=10 --object-size=1MiB --process-count=10 --thread-count=10The following command can be used to bundle and export the diagnostic information to a user defined
destination:PATHgcloud 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:
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_TYPESmust be one of:DIRECT_CONNECTIVITY,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-countand--thread-countflag values will be ignored if provided.SLICED: Performs a sliced download of objects to a directory. Parallelism can be controlled via
--process-countand--thread-countflags.FILE: Download objects as files. Parallelism can be controlled via
--process-countand--thread-countflags.DOWNLOAD_TYPEmust be one of:FILE,SLICED,STREAMING. --logs-path=LOGS_PATH- If the diagnostic supports writing logs, write the logs to this file location.
--upload-type=UPLOAD_TYPE; default=<UploadType.FILE: 'FILE'>-
Upload strategy to use for the
UPLOAD_THROUGHPUTdiagnostic test.FILE: Uploads files to a bucket. Parallelism can be controlled via
--process-countand--thread-countflags.PARALLEL_COMPOSITE: Uploads files using a parallel composite strategy. Parallelism can be controlled via
--process-countand--thread-countflags.STREAMING: Streams the data to the bucket, does not use parallelism.
--process-countand--thread-countflag values will be ignored if provided.UPLOAD_TYPEmust 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-countflag.
-
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 diagnosecommand. -
Output of running the
gcloud info --anonymizecommand.
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 helpfor 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. This variant is also available:
gcloud storage diagnose
gcloud alpha 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 2025-09-24 UTC.