What are inodes?
In a nutshell, inodes are the data structure Linux servers use to store information about a file. inodes are set to a specific number on your server. When you write files to the server, you are using an inode for each file. When your inodes reach their limit, you will get Disk Space errors and other strange behaviors with your site.
How do I view my servers inodes?
Below is the Linux command for finding the inodes for your server. This command is ran through shell.
df -i
Get to know inotify
Inotify is a Linux kernel feature that monitors file systems and immediately alerts an attentive application to relevant events, such as a delete, read, write, and even an unmount operation.
http://www.infoq.com/articles/inotify-linux-file-system-event-monitoring
Inotify is a file change notification system in the Linux kernel, available since version 2.6.13.
grep INOTIFY_USER /boot/config-$(uname -r) CONFIG_INOTIFY_USER=y
# pwd /proc/sys/fs/inotify root@web01 [/proc/sys/fs/inotify]# ls ./ ../ max_queued_events max_user_instances max_user_watches#bydefault value in max_user_watches is = 8192#echo 65535 > /proc/sys/fs/inotify/max_user_watches# cat /proc/sys/fs/inotify/max_user_watches 65536To make the change permanent, edit the file /etc/sysctl.conf and add this line to the end of the file:fs.inotify.max_user_watches=65535If this server is a VPS and it is running in a OpenVZ container then you are NOT allowed to modify any kernel parameter of that container. and you will get below errorroot@vps01 [/proc/sys/fs/inotify]# sysctl -w fs.inotify.max_user_watches=65535 error: permission denied on key 'fs.inotify.max_user_watches'change it from host
No comments:
Post a Comment