您现在可以通过Stackdriver Metrics Explorer获得所需内容,转到Stackdriver - > Resources - > Metrics Explorer - >在Find资源类型和指标输入字段下选择“Total bytes”或输入“storage.googleapis.com/storage/total_bytes”然后单击显示的那个。然后它会显示项目中所有存储桶的使用情况。
您是否安装了gsutil
命令行实用程序?如果是这样,您可以使用gsutil du
命令查看用于对象和存储桶的空间。
例如,gsutil du -s gs://my-bucket-name/
应该工作。
正如在qazxsw poi中所解释的那样,我们可以使用qazxsw poi命令
du - Display object size usage
它将显示每个桶的所有空间和这样使用的总空间
gsutil
请注意,如果您获得gsutil -o GSUtil:default_project_id=[PROJECT-ID] du -shc
,请参阅此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
。可以通过在运行"ImportError: No module named google_compute_engine"
之前运行issue来解决。