[ale] inotify/kernel watch table full?

David Tomaschik david at systemoverlord.com
Mon Apr 11 22:17:05 EDT 2016


This shell snippet will give you a per-PID count of inotify watches:

find /proc -type l -lname 'anon_inode:inotify' 2>/dev/null | grep -v task |
cut -d '/' -f 3 | sort | uniq -c

This works by finding all inotify watches (which are represented as an fd
for the process, and the proc filesystem exposes them as a symlink to
'anon_inode:inotify') then grabbing the PIDs, sorting and counting the
repetitions.  `ps` should help you figure out the process from the PID :)

Yes, you can increase your inotify cap: it doesn't take memory immediately,
but each one *used* is 1k bytes of kernel memory.  The cap is just there to
prevent inotify from consuming all your memory.

David

On Mon, Apr 11, 2016 at 7:23 AM, leam hall <leamhall at gmail.com> wrote:

> Trying to understand inotify on 2.6.x kernels. Have started seeing issues
> with the maximum number of kernel watches (default 8912) being hit be no
> idea how to look into the issue to see exactly what is using exactly how
> many.
>
> From some reading it seems that doubling the max number of watches works
> but takes out kernel memory. Does anyone have experience/knowledge on this?
>
> Leam
>
>
> --
> Mind on a Mission <http://leamhall.blogspot.com/>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://mail.ale.org/mailman/listinfo/ale
> See JOBS, ANNOUNCE and SCHOOLS lists at
> http://mail.ale.org/mailman/listinfo
>
>


-- 
David Tomaschik
OpenPGP: 0x5DEA789B
https://systemoverlord.com
david at systemoverlord.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.ale.org/pipermail/ale/attachments/20160411/0d4b0abc/attachment.html>


More information about the Ale mailing list