My system is CentOS.

I'm trying to get this by listing fs.inotify variables via sysctl call (sysctl fs.inotify), but didn't found anything useful, only variables to specify limits.

  • 2
    I don't think there are any provisions for finding the number of established watches, just from looking at man inotify(7). The process that establishes a watch can keep track of it, but that's it.
    – tink
    Mar 17 '13 at 20:39

lsof | grep inotify | wc -l

lsof prints special line for each inotify watch allocation.

See How do I find out what inotify watches have been registered? for details.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.