gcloud alpha storage diagnose

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 forcommon gcloud storage issues.

TheURL argument must name an exisiting bucket for which the useralready has write permissions. Standard billing also applies. Several testfiles/objects will be uploaded and downloaded to this bucket to gauge out theperformance metrics. All the temporary files will be deleted on successfullcompletion of the command.

By default, the command executesDOWNLOAD_THROUGHPUT,UPLOAD_THROUGHPUT andLATENCY tests. Tests to executecan be overriden by using the--test-type flag. Each test uses thecommand defaults or gcloud CLI configurations for performing the operations.This command also provides a way to override these values via means of differentflags 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 diagnosticinformation specific to individual tests on successful completion.

EXAMPLES
The following command runs the default diagnostic tests onmy-bucket bucket:
gcloudalphastoragediagnosegs://my-bucket

The following command runs only UPLOAD_THROUGHPUT and DOWNLOAD_THROUGHPUTdiagnostic tests:

gcloudalphastoragediagnosegs://my-bucket--test-type=UPLOAD_THROUGHPUT,DOWNLOAD_THROUGHPUT

The following command runs the diagnostic tests using10 objects of1MiB size each with10 threads and10 processes at max:

gcloudalphastoragediagnosegs://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 diagnosticinformation to a user definedPATHdestination:

gcloudalphastoragediagnosegs://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 pathand run other diagnostics if the upload fails.

DOWNLOAD_THROUGHPUT: Upload objects to the specified bucket and record thenumber of bytes transferred per second.

UPLOAD_THROUGHPUT: Download objects from the specified bucket and record thenumber of bytes transferred per second.

LATENCY: Write the objects, retrieve their metadata, read the objects, andrecord 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'>
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 beignored if provided.

SLICED: Performs asliceddownload 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
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 theUPLOAD_THROUGHPUTdiagnostic test.

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

PARALLEL_COMPOSITE: Uploads files using aparallelcomposite 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 beignored 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 groupare 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 eachobject specified using--object-count flag.
Export diagnostic bundle.
--export
Generate and export a diagnostic bundle. The following information will bebundled and exported into a gzipped tarball (.tar.gz):
  • Latest gcloud CLI logs.
  • Output of running thegcloud storage diagnosecommand.
  • Output of running thegcloud info --anonymize command.

Note: This command generates a bundle containing system information like diskcounter detlas, CPU information and system configurations. Please exercisecaution while sharing.

This flag argument must be specified if any of the other arguments in this groupare 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 thiscommand fails with API permission errors despite specifying the correct project,you might be trying to access an API with an invitation-only early accessallowlist. This variant is also available:
gcloudstoragediagnose

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-09-24 UTC.