新浪博客

tail:inotifycannotbeused,revertingtopolling

2020-06-20 17:17阅读:
tail -f 日志文件出现警告:
tail: inotify cannot be used, reverting to polling: Too many open files
查询系统进程打开文件情况:
lsof | awk '{ print $2; }' | sort -rn | uniq -c | sort -rn | head
处理方法:
在 /etc/sysctl.conf文件中加入下面的配置:
fs.inotify.max_user_watches=1048576
fs.inotify.max_user_instances=1048576
#sysctl -p /etc/sysctl.conf 使修改生效。
再次执行 tail -f 日志文件 就可以了。

我的更多文章

下载客户端阅读体验更佳

APP专享