Inode Count

From Lunarpages Web Hosting Wiki

Revision as of 16:36, 18 August 2008 by Lunarwiki (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.

Want to read this in another language?

Lunarpages Deal: Save $72 on your next Business web hosting plan! Starting at $18.95 per month, this an offer you can't miss. Perfect for business and e-commerce hosting sites, comes with free e-commerce tools and a TremenDesk Help Desk. Limited time offer!