Monitoring /proc/sys/fs/inode-nr

Quoting kernel/Documentation/sysctl/fs.txt

Nr_inodes stands for the number of inodes the system has allocated, this can be slightly more than inode-max because Linux allocates them one pageful at a time.

Nr_free_inodes represents the number of free inodes (?) and preshrink is nonzero when the nr_inodes > inode-max and the system needs to prune the inode list instead of allocating more.

So your assumption is rather incorrect.

You can use "df -i" instead to get inode utilization.


If you're looking to check disk inode usage (which is actually important for Virtuozzo/OpenVZ installs since we've had issues with that) the check_disk Nagios plugin has -iwarning and -icritical options:

-W, --iwarning=PERCENT% Exit with WARNING status if less than PERCENT of inode space is free

-K, --icritical=PERCENT% Exit with CRITICAL status if less than PERCENT of inode space is free

Tags:

Unix

Inode

Nagios