Report this

What is the reason for this report?

How can i check individual domains and disk usage?

Posted on January 19, 2014

I need to check how much space a website hosted on our server is taking.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

If you would like to check on the individual website, you first need to determine a) the root directory of the site and b) if there is any data outside of that directory the site uses. If it is for instance a WordPress site, the size of the website is the sum total of the files in its root directory, associated directories [like when content is linked outside of the default directory] and the database the site uses. <br> <br>If the site is composed of just static files and does not use a database. Then you can SSH into your droplet, cd to the directory where the site’s files are, and run du -h --max-depth=1 <br> <br>This will return the size of the current directory and sub-directories from within.

Hello, @1a07bcc79f21590b3ed2622d5807bd

You can check which folders are using the most space on the Droplet by using the disk utilization command, du:

  1. du -h --max-depth=1 /

You can check our tutorial on How do I fix disk space issues on my Droplet here:

https://docs.digitalocean.com/support/how-do-i-fix-disk-space-issues-on-my-droplet/

Regards

Heya,

There is also an ncurses interface for du, appropriately called ncdu, that you can install:

  1. sudo apt install ncdu

This will graphically represent your disk usage:

  1. ncdu
Output--- /root ----------------------------------------------------------------------
    8.0KiB [##########] /.ssh
    4.0KiB [#####     ] /.cache
    4.0KiB [#####     ]  .bashrc
    4.0KiB [#####     ]  .profile
    4.0KiB [#####     ]  .bash_history

You can step through the filesystem by using the up and down arrows and pressing Enter on any directory entry.

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.