There may be instances that you are not able to access cPanel and/or WHM or your website may be running slow. This may be caused by the disk space usage that is already full. Follow the instructions below on how to view disk size and usage.
(Note: For Virtual Private Servers and Dedicated Server Hosting packages only.)
View disk size and usage through SSH
Step 1. Access SSH (Windows PC) (MAC OSx).
Step 2. The df command will show you results of the disk information in bytes.
df
2.1. If you want to check the total amount of disk space you have for the server, used and available disk space in gigabytes, type in the following command:
df -h
2.2. If you want to check the total amount of disk space you have for the server, used and available disk space in kilobytes, type in the following command:
df -k
2.3. If you want to check the total amount of disk space you have for the server, used and available disk space in megabytes, type in the following command:
df -m
2.4. If you want to check the file system inodes, type in the following command:
df -i
2.5. If you want to check the file system type of your system, use the following command:
df -T
Step 3. You can check disk usage by using the du command. This is most useful for a specific hosting account or a cPanel account.
du /home/cPanel_username/public_html
3.1. The du -h command shows results in “Human Readable Format“ – sizes in Bytes, Kilobytes, Megabytes, Gigabytes etc. This will give you more specific results with the size of the file and its directory path.
du -h /home/cPanel_username/public_html
You may also use this for a specific folder.
du -h /home/cPanel_username/public_html/specific_folder
3.2. The command du -sh will show the disk usage summary of the directory.
du -sh /home/cPanel_username/public_html
3.3. The du –max-depth=1 command
This can also be sorted using the command below:
du --max-depth=1 | sort -n | awk 'BEGIN {OFMT = "%.0f"} {print $1/1024,"MB", $2}'
Do not hesitate to contact our support team if you have further questions.