Inode Count

From Lunarpages Web Hosting Wiki

I just have a quick question ( I hope). Is there a quick way to tell which site or sites on a VPS, has the highest amount of inodes? Trying to do some maintenance to keep the number down.

Since each inode used assumes a file or a folder connected to it, usually those are sites creating or using huge amount of files (i.e. thousands of html pages or maybe a lot of session files). A lot of emails in the mail queue or mail boxes can also be the reason of high inodes utilization. Please also be advised that if you are sure that high inodes usage is not caused due to some sort of abuse, their amount can be increased by your request via the Help Desk.

This command might be helpful to you in finding the folder using a great part of the inodes. It outputs the top 5 file system objects utilizing the most inodes in the current folder:

for i in `ls -1A`; do echo "`find $i | sort -u | wc -l` $i"; done | sort -rn | head -5

Just start running it from / in server shell, and changing the current folder to the next folder with the maximum number of inodes used.