How to find inode usage of a Cpanel account:
As you know for most of the hosting accounts there will be a limit in the usage of inode. Mostly the inode will be filled by the emails, once the inode usage becomes full then the server will stop working. So for checking inodes you can use the following commands,
For getting the usage of inodes on the entire server you can use the following command,
An example result of the command is,
[email protected] [/home/mytokri]# df -i Filesystem Inodes IUsed IFree IUse% Mounted on /dev/md2 60776448 572602 60203846 1% / tmpfs 1904849 1 1904848 1% /dev/shm /dev/md0 25584 38 25546 1% /boot /dev/md1 131072 1591 129481 2% /tmp
You can see the count and percentage of free inodes from the respective tabs.
Also the important one is to find the inode usage of a single cPanel account. For that first you need to go to the home folder of the account via SSH,
Now you will be on the home folder of the user, you can use the following command to find the inode usage of the account,
echo "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"
The example output of the command is,
[email protected] [/home/iservertest]# echo "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" Inode usage for: /home/iservertest 108 - .cpanel 38 - etc 2 - .fontconfig 8 - .htpasswds 9 - logs 12480 - mail 10 - newsletter 2 - public_ftp 128796 - public_html 1 - .sqmailattach 2 - .sqmaildata 6 - ssl 396 - tmp 3 - .trash Total: 141879
That is it.
If you need our help to fix any issues on your server. Please feel free to contact us, simply email to [email protected]
Monthly server support with Unlimited tickets, 24×7 monitoring, Security Audit and lot more for just $59