All of lore.kernel.org
 help / color / mirror / Atom feed
From: Albert Vaca Cintora <albertvaka@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: rdunlap@infradead.org, mingo@kernel.org, Jan Kara <jack@suse.cz>,
	ebiederm@xmission.com,
	Nicolas Saenz Julienne <nsaenzjulienne@suse.de>,
	linux-kernel@vger.kernel.org,
	Matthias Brugger <mbrugger@suse.com>
Subject: Re: [PATCH v2] kernel/ucounts: expose count of inotify watches in use
Date: Thu, 25 Apr 2019 23:39:58 +0200	[thread overview]
Message-ID: <CAAQViEsaKd3FV+gMP92Qx+1DxRw0z-1r+jRUkezVB6QrJTRukw@mail.gmail.com> (raw)
In-Reply-To: <20190425130657.ba16b6a3f704cd724f670622@linux-foundation.org>

On Thu, Apr 25, 2019 at 10:07 PM Andrew Morton
<akpm@linux-foundation.org> wrote:
>
> On Fri,  1 Feb 2019 21:39:59 +0100 Albert Vaca Cintora <albertvaka@gmail.com> wrote:
>
> > Adds a readonly 'current_inotify_watches' entry to the user sysctl table.
> > The handler for this entry is a custom function that ends up calling
> > proc_dointvec. Said sysctl table already contains 'max_inotify_watches'
> > and it gets mounted under /proc/sys/user/.
> >
> > Inotify watches are a finite resource, in a similar way to available file
> > descriptors. 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.
>
> Matthias said "Albert found this problem while working on montitoring
> software, so it fixes a real problem out there", so please include full
> details of the problem which you encountered so that we are better able
> to understand the value of the patch.
>

This is an important metric to track as a sysadmin. Currently,
monitoring software have to workaround the lack of a single metric by
iterating all the file descriptors for all processes and checking
which ones are inotify watches [1].

If this seems enough justification to you, please say so and I will
submit a patch v3 with the requested implementation changes.

[1] https://github.com/prometheus/node_exporter/blob/master/text_collector_examples/inotify-instances

Albert

      reply	other threads:[~2019-04-25 21:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-01 20:39 [PATCH v2] kernel/ucounts: expose count of inotify watches in use Albert Vaca Cintora
2019-02-22 17:58 ` Albert Vaca Cintora
2019-04-25 15:58   ` Matthias Brugger
2019-04-25 20:06 ` Andrew Morton
2019-04-25 21:39   ` Albert Vaca Cintora [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAQViEsaKd3FV+gMP92Qx+1DxRw0z-1r+jRUkezVB6QrJTRukw@mail.gmail.com \
    --to=albertvaka@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=ebiederm@xmission.com \
    --cc=jack@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbrugger@suse.com \
    --cc=mingo@kernel.org \
    --cc=nsaenzjulienne@suse.de \
    --cc=rdunlap@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.