Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Stupid question but how can I see the total size of files I am storing in Google Cloud?

Hi, I am new to Google Cloud and trying out google cloud storage and since I am being charged based on the size of the files I am storing I was trying to see the total size of what I have uploaded in google cloud storage but there doesn't appear to be an obvious place to see this, can some please advise?

Also I have noticed the charges I have been billed so far seem to be higher than what I believe I have uploaded based on the 2 cents per gb per month archive charge, am I getting billed for uploading documents as well?

4 9 27.8K
9 REPLIES 9

Hi @jamphi24,

Welcome to Google Cloud Community!

To see the file size of objects stored in Google Cloud Storage, you can use either the Google Cloud Console or the gsutil command to check size consumed by storage bucket.

. Here's how you can check the file size using both methods:

  1. Google Cloud Console:

    • Open the Google Cloud Console in your web browser.
    • Navigate to the Cloud Storage section.
    • Select the bucket where your object is stored.
    • Locate the object in the bucket and click on its name.
    • In the object details panel, you should see the file size displayed.
  2. Using gsutil from cloud shell:

Both methods allow you to view the file size of objects stored in Google Cloud Storage. Choose the one that is most convenient for you based on your preferred workflow and tools. 

Referring to this documentation, pricing in Cloud Storage is based on these factors:

  • Data storage: the amount of data stored in your buckets. Storage rates vary depending on the storage class of your data and location of your buckets.
  • Data processing: the processing done by Cloud Storage, which includes operations charges, any applicable retrieval fees, and inter-region replication.
  • Network usage: the amount of data read from or moved between your buckets.

See this link for some of the detailed pricing examples for different scenarios. It's important to note that pricing details may change over time, so it's recommended to consult the official Google Cloud Storage pricing documentation for the most up-to-date and accurate information.

Hope this helps.

Check out this blog post. This is not a stupid question. This is something that is almost trivial in usual file systems, but gets really tricky once you deal large data. 

Definitely not a stupid question @jamphi24! Thanks for bringing it to the Community and thanks @KirTitievsky & @anjelisa for hoping in! 

 

Hi thank you for the replies.

Couple of follow ups

The blog post does not seem to work? 

jamphi24_0-1686822962554.png

And on the cloud console that is fine for seeing file by file, I am looking to see for the whole usage though or for a whole folder, so I can easily see what I am going to be billed for? Is there a quick way to do that? Many thanks

 

The blog post  works for me  now. 

If you want to do this from the console you can use Metrics Explorer...

https://cloud.google.com/storage/docs/getting-bucket-size#bucket-size 

 

That would make sense, but unfortunately there's this essential point in the instructions:

b. In the Active metric categories menu, select Storage.

There is no "Storage". What now?

If the metric is not active, it likely means that .... well, it's not active.    Perhaps the bucket you are interested in is in a different project than what Monitoring is using when you look?  Also, I see that Cloud Storage metrics are actually grouped under "GCS Bucket" resource.  Can you see if that shows up for you? 

no such thing as sq or etc, cepuxuax, ask, say x etc any nmw s perfx