spe*_*ane 7 dashboard google-cloud-storage google-cloud-console google-cloud-platform
我正在使用Google云端存储.我在哪里可以确定我使用的总空间?我似乎无法在仪表板中找到它告诉您的总使用量,以兆字节或千兆字节为单位.
小智 8
您gsutil安装了命令行实用程序吗?如果是这样,您可以使用该gsutil du命令查看对象和存储桶已使用的空间。
例如,gsutil du -s gs://my-bucket-name/应该有效。
https://cloud.google.com/storage/docs/gsutil/commands/du
正如du - 显示对象大小使用情况中所述,我们可以使用gsutil命令
gsutil -o GSUtil:default_project_id=[PROJECT-ID] du -shc
Run Code Online (Sandbox Code Playgroud)
它将显示每个存储桶的所有空间以及已使用的总空间,如下所示
24.18 MiB gs://appspot.[PROJECT-ID].com
687.46 MiB gs://artifacts.[PROJECT-ID].appspot.com
947 B gs://[PROJECT-ID]_cloudbuild
252.55 MiB gs://staging.[PROJECT-ID].appspot.com
9.36 GiB gs://us.artifacts.[PROJECT-ID].appspot.com
10.3 GiB total
Run Code Online (Sandbox Code Playgroud)
请注意,如果您收到"ImportError: No module named google_compute_engine"请参阅此问题。export BOTO_CONFIG=/dev/null可以通过运行前运行来解决gsutil。
您现在可以通过 Stackdriver Metrics Explorer 获得所需的内容,转至 Stackdriver -> Resources -> Metrics Explorer -> 在 Find resource type and metric entry 字段下选择“Total bytes”或输入“storage.googleapis.com/storage/total_bytes”然后点击出现的那个。然后它会显示您项目中所有存储桶的使用情况。
| 归档时间: |
|
| 查看次数: |
1866 次 |
| 最近记录: |