我如何查找已注册了哪些inotify手表? [英] How do I find out what inotify watches have been registered?

查看:84
本文介绍了我如何查找已注册了哪些inotify手表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将inotify监视限制设置为1024(我认为默认值是128?).尽管如此,yeoman,Guard和Dropbox不断失败,并告诉我提高我的免疫极限.在这样做之前,我想知道什么消耗了我所有的手表(我的Dropbox中只有很少的文件).

I have my inotify watch limit set to 1024 (I think the default is 128?). Despite that, yeoman, Guard and Dropbox constantly fail, and tell me to up my inotify limit. Before doing so, I'd like to know what's consuming all my watches (I have very few files in my Dropbox).

是否存在/proc或/sys的某个区域,或者我可以运行的某些工具,以了解当前已注册哪些手表?

Is there some area of /proc or /sys, or some tool I can run, to find out what watches are currently registered?

推荐答案

inotify文件系统选项

inotify filesystem options

sysctl fs.inotify

打开的文件

lsof | grep inotify | wc -l

增加这样的值

  • sysctl -n -w fs.inotify.max_user_watches=16384
  • sysctl -n -w fs.inotify.max_user_instances=512
  • sysctl -n -w fs.inotify.max_user_watches=16384
  • sysctl -n -w fs.inotify.max_user_instances=512

这篇关于我如何查找已注册了哪些inotify手表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆