There was a problem loading the comments.

How to check inode usage of an account on a cPanel server

Support Portal  »  Knowledgebase  »  Viewing Article

  Print

What is Inode?

An inode is an internal data structure that Linux uses to store information about a filesystem object. Each file/directory on a Linux system has an inode and is identified by an inode number, hence the inode count is the total number of files/directories on the server. Inodes provide important information of a file such as user, group ownership, access mode and type.

How to check Inode usage of an account on a cPanel server?

You can enable the option “Display File Usage information in the cPanel stats bar (inode count)” in “Tweak Settings” to display the inode count on the cPanel status bar.

WHM »Server Configuration »Tweak Settings »Display File Usage information in the cPanel stats bar (inode count)

Also, you can find the total Inode usage of the current directory by using the following command.

 
find . | wc -l

The following script can help you to check Inode usage for all directories located in the current directory:

 
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 output will be like this:

 
Inode usage for: /home/fortest
2 - .cpanel
1 - etc
1 - .htpasswds
16 - mail
2 - public_ftp
2 - public_html
1 - tmp
Total: 32


That’s it!

Share via

Related Articles

Copyright © 2023 TheGigabit. All right reserved. Reg.No: 200701034297 (792326-P)