Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Cloud Storage: How Much Total Space Am I Using?

I am using Google Cloud Storage. Where can I determine my total space used? I can't seem to find where in the dashboard it tells you the total usage in megabytes or gigabytes.

Screenshot of Dashboard

like image 332
speedplane Avatar asked Oct 12 '15 13:10

speedplane


People also ask

How do I check my space on Google cloud?

Your storage is shared across Google Drive, Gmail, and Google Photos. When your account reaches its storage limit, you can't send or receive emails. To see how much space you have left, on a computer, go to google.com/settings/storage.

How much Google storage do I have?

Every Google Account comes with 15 GB of storage that's shared across Google Drive, Gmail, and Google Photos.

How do I check my Google Drive storage limit?

Click your account icon in the top right corner, and select “Manage your Google Account.” 3. Scroll down and find “Account storage.” This will tell you how much storage you have used. You can also click “Manage storage” to see how your storage is divided between Gmail, Photos and Google Drive.

What is using my Google Drive storage?

When you open your Google Drive page, you should see a small section near the bottom left of the screen that displays how much space you've used. If you hover your cursor over that, a pop-up window will appear with an exclamation point in a blue circle (Figure A).


3 Answers

As explained in du - Display object size usage we coul use gsutil command

gsutil -o GSUtil:default_project_id=[PROJECT-ID] du -shc

It will show all space of each of the buckets and total space used like this

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

Note if you get "ImportError: No module named google_compute_engine" please refer to this issue. Can be solved by running export BOTO_CONFIG=/dev/null before running gsutil.

like image 84
Chetabahana Avatar answered Sep 22 '22 16:09

Chetabahana


What you need is now available through Stackdriver Metrics Explorer, go to Stackdriver -> Resources -> Metrics Explorer -> under the Find resource type and metric entry field choose "Total bytes" or enter "storage.googleapis.com/storage/total_bytes" and click on the one that shows up. It'll then show you usage for all buckets in your project.

like image 31
sabujp Avatar answered Sep 19 '22 16:09

sabujp


Do you have the gsutil command line utility installed? If so, you can use the gsutil du command to see the space used for objects and buckets.

E.g., gsutil du -s gs://my-bucket-name/ should work.

https://cloud.google.com/storage/docs/gsutil/commands/du

like image 45
saturnism Avatar answered Sep 22 '22 16:09

saturnism