Question
What's the Other Usage in my cPanel account, and how do I find it?
Answer
The Other Usage includes files not within your cPanel user's home directory but owned by the cPanel user, as well as metadata the system uses to store email in the mail directory, email in Trash folders, and files you do not have permission to access. The most common file types are email content, backups, or /tmp.
- Log in to the server via SSH or WHM's Terminal as the
rootuser Run the following command:
# cpaneluser=USER && find / -path /home/virtfs -prune -o -path /home/${cpaneluser} -prune -o -user "${cpaneluser}" -type f -ls > files_outside_homedir.txt 2>/dev/null
Note: You must replace USER with the actual cPanel username.
Run the following command to calculate the disk size:
# awk '{SUM += $7} END {print SUM}' files_outside_homedir.txt
Note: The output from the command above shows the number of filesystem blocks used, as filesystem quotas are based on blocks. In order to get an idea of the conversion between blocks and size, you can run the following command:
# stat -c "%b blocks of %B bytes per block" /path/to/file
For example, if a file uses 16 blocks of 512 bytes each, the total size of that file on disk is 8k, even though the file might only be 5.4k.
If the above procedure does not find any large file outside the home directory, it could be due to an open file, which you can locate with the following command:
# lsof +L1 | awk '{if ($7 > 0) print}'
Comments
0 comments
Article is closed for comments.