How do I find out what inotify watches have been registered?

前端 未结 7 2055
渐次进展
渐次进展 2021-01-30 05:14

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 do

7条回答
  •  爱一瞬间的悲伤
    2021-01-30 05:33

    1. The default maximum number of inotify watches is 8192; it can be increased by writing to /proc/sys/fs/inotify/max_user_watches.
      You can use sysctl fs.inotify.max_user_watches to check current value.

    2. Use tail -f to verify if your OS does exceed the inotify maximum watch limit.
      The internal implementation of tail -f command uses the inotify mechanism to monitor file changes.
      If you've run out of your inotify watches, you'll most likely to get this error:

      tail: inotify cannot be used, reverting to polling: Too many open files

    3. To find out what inotify watches have been registered, you may refer to this, and this. I tried, but didn't get the ideal result. :-(

    Reference:
    https://askubuntu.com/questions/154255/how-can-i-tell-if-i-am-out-of-inotify-watches
    https://unix.stackexchange.com/questions/15509/whos-consuming-my-inotify-resources
    https://bbs.archlinux.org/viewtopic.php?pid=1340049

提交回复
热议问题