Check Inode usage for a cPanel Account

Oct 23 • All • 779 Views • No Comments on Check Inode usage for a cPanel Account

An inode is a record in a disk table which is used to keep information about a file on your hosting account. So in simple words, the number of inodes indicates the number of files and folders you have. This includes everything on your account, emails, files, and basically everything stored under the server which comes under your permission.

If you have reached the inode limit, then you will not be able to upload new files, recieve emails and much less access the websites correctly. So how do we know that the reason any of these issues occur is due to the inode limit being maxed out?. Well, there are many methods to do it. Let’s start with the simplest.

In a cPanel server, you can view the inode usage of your account in the statistics bar shown to the left by the name “File Usage”. If you are unable to locate the metrics, then it means probably your host might not have enabled it.

If you are on a VPS/Dedicated server (have root access), then you can enable it at through WHM >> Tweak Settings >> Display File Usage information in the cPanel stats bar (inode count)

If your host does not enable this settings or else if you have SSH Access to your account, then you can find the inode usage of your account by issuing the following command.

cd ~ && find . | wc -l

What this command does is that it first navigates to the home directory of the user and then finds all files under the account and lists its count. As we discussed earlier, inodes are equal to the number of files under an account so the count of the files equals the inodes used.

user123@server [~/public_html]# cd ~ && find . | wc -l


To get a detailed report about the inode usage that is which folders are using up more inodes, you can issue the following command.

echo “Detailed Inode usage for: $(pwd)” ; for d in `find -maxdepth 1 -type d |cut -d\/ -f2 |grep -xv . |sort`; do c=$(find $d |wc -l) ; printf “$c\t\t- $d\n” ; done ; printf “Total: \t\t$(find $(pwd) | wc -l)\n”
user123@server [~]# echo “Detailed Inode usage for: $(pwd)” ; for d in `find -maxdepth 1 -type d |cut -d\/ -f2 |grep -xv . |sort`; do c=$(find $d |wc -l) ; printf “$c\t\t- $d\n” ; done ; printf “Total: \t\t$(find $(pwd) | wc -l)\n”

Detailed Inode usage for: /home/user123

524              – .cagefs

3                  – .cl.selector

139              – .cpanel

6                  – .cphorde

2                  – .fontconfig

417              – .gem

5                   – .gnupg

5                  – .htpasswds

2                   – .pki

16                 – .softaculous

1                   – .sqmailattach

7                   – .sqmaildata

7                   – .ssh

12                 – .trash

2                   – .vim

36                  – etc

38                  – logs

2605               – mail

1                      – perl5

2                      – public_ftp

66129              – public_html

5846                 – ruby

5                     – softaculous_backups

11                    – ssl

2                      – tempdir

708                   – tmp

Total: 76549

If you are on a dedicated server/VPS having root access to your system, then you can find the inode usage of your account using a simpler command

quota -s user


root@server [~]# quota -s user123

Disk quotas for user user123 (uid 1216):

Filesystem blocks quota limit grace files quota limit grace

/dev/sda6       124           3000M     3000M      93           0    0

/dev/sda8        2634M    3000M      3000M      76547     0    0

/dev/sda2        76            3000M      3000M      25          0    0

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

« »