gcloud alpha storage diagnose Stay organized with collections Save and categorize content based on your preferences.
- 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.The
URLargument 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 executes
DOWNLOAD_THROUGHPUT,UPLOAD_THROUGHPUTandLATENCYtests. Tests to executecan be overriden by using the--test-typeflag. 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 on
bucket:my-bucketgcloudalphastoragediagnosegs://my-bucketThe following command runs only UPLOAD_THROUGHPUT and DOWNLOAD_THROUGHPUTdiagnostic tests:
gcloudalphastoragediagnosegs://my-bucket--test-type=UPLOAD_THROUGHPUT,DOWNLOAD_THROUGHPUTThe following command runs the diagnostic tests using
objects of10size each with1MiBthreads and10processes at max:10gcloudalphastoragediagnosegs://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 diagnosticinformation to a user defined
destination:PATHgcloudalphastoragediagnosegs://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_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 beignored if provided.SLICED: Performs asliceddownload 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 aparallelcomposite 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 beignored 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 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-countflag.
- 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 the
gcloud storage diagnosecommand. - Output of running the
gcloud info --anonymizecommand.
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 helpfor 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.