在使用inotify监控磁盘时 inotify报错
[root@lamp1 ~]# sh rsync.sh start
Rsync is Start -- 2011-05-12 14:59:31
Failed to watch /usr/local/apache2/htdocs/; upper limit on inotify watches reached!
Please increase the amount of inotify watches allowed per user via `/proc/sys/fs/inotify/max_user_watches'.
cat一下这个文件,默认值是8192,
echo 8192000 >> /proc/sys/fs/inotify/max_user_watches
即可~
在inotify 的时候经常遇到 建议写入sysctl.conf
fs.inotify.max_user_watches=8192000
阅读(5630) | 评论(0) | 转发(0) |