加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

tail:inotifycannotbeused,revertingtopolling

(2020-06-20 17:17:43)
分类: linux类文章

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 日志文件 就可以了。

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有