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

frio picture frio · Dec 7, 2012 · Viewed 43.4k times · Source

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).

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

Answer

David Canós picture David Canós · Jul 28, 2014

inotify filesystem options

sysctl fs.inotify

opened files

lsof | grep inotify | wc -l

Increase the values like this

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