linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/1] kernel/ucounts: expose current inotify watch count
@ 2019-01-21 16:45 Albert Vaca Cintora
  2019-01-21 16:45 ` [PATCH 1/1] " Albert Vaca Cintora
  0 siblings, 1 reply; 3+ messages in thread
From: Albert Vaca Cintora @ 2019-01-21 16:45 UTC (permalink / raw)
  To: jack, ebiederm, linux-kernel, nsaenzjulienne; +Cc: Albert Vaca Cintora

This patch enables reading the amount of inotify watches in use.

Inotify watches are a finite resource, in a similar way to available file
descriptors. However, there is no way to check how many watches we have
available or in use, we can only read the max.

This patch adds a 'current_inotify_watches' entry to the per-user sysctl table
that gets mounted under /proc/sys/user/. This is the same table that contains
'max_inotify_watches'.

The motivation for this patch is to be able to set up monitoring and alerting
before an application starts failing because it runs out of inotify watches.

Albert Vaca Cintora (1):
  kernel/ucounts: expose current inotify watch count

 kernel/ucount.c | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

--
2.20.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-22 10:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-21 16:45 [PATCH 0/1] kernel/ucounts: expose current inotify watch count Albert Vaca Cintora
2019-01-21 16:45 ` [PATCH 1/1] " Albert Vaca Cintora
2019-01-22 10:35   ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).