Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Dec 2016 16:27:59 +1100
From:      Peter Jeremy <peter@rulingia.com>
To:        Warner Losh <imp@bsdimp.com>
Cc:        Ed Schouten <ed@nuxi.nl>, FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Sysctl as a Service, or: making sysctl(3) more friendly for monitoring systems
Message-ID:  <20161213052759.GP61036@server.rulingia.com>
In-Reply-To: <CANCZdfrjsLdMoZ9Eg19-mEbyxUefJxUmeq=cT_bagrJqzWnUOg@mail.gmail.com>
References:  <CABh_MKk87hJTsu1ETX8Ffq9E8gqRPELeSEKzf1jKk_wwUROgAw@mail.gmail.com> <eea0aa41-2bbc-0ddc-d951-f495c5ba2341@freebsd.org> <200A5D70-24CE-4843-B99D-E10A2AF4F68F@FreeBSD.org> <CABh_MKkAoTj4wA9oTz-fK0rokgMfuiUWpLt6t=qRXy6vvCh7rg@mail.gmail.com> <CANCZdfrjsLdMoZ9Eg19-mEbyxUefJxUmeq=cT_bagrJqzWnUOg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--Md/poaVZ8hnGTzuv
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2016-Dec-12 17:57:07 -0700, Warner Losh <imp@bsdimp.com> wrote:
>On Mon, Dec 12, 2016 at 6:34 AM, Ed Schouten <ed@nuxi.nl> wrote:
>> $ time ./prometheus_sysctl_exporter | wc -l
>>         0.00 real         0.00 user         0.00 sys
>>     3162
>>
>> If our sysctl tree would get substantially larger at some point, we
>> should of course revisit this.
>
>That sounds cool. I'd love to see what you came up with to get those resul=
ts.

I think that's impressive as well.

>While we're here... there's one thing I'd love to see from  a
>hypothetical /dev/sysctl... When a sysctl value changes (or some
>subset), I'd like it to appear on a read-channel. That way, I could
>monitor temperature w/o needing to constantly poll for changes, for
>example.

That sounds like a job for kqueue(2), though it would need to be plumbed
through.  The biggest problem I see is that nothing in the sysctl mechanism
has any way of reporting that a value has changed and so consumers of that
data should re-check.  This means that you'd probably just wind up polling
in the kernel.

Note that Prometheus is designed around regularly polling the systems it's
monitoring so this sort of functionality wouldn't benefit it.

--=20
Peter Jeremy

--Md/poaVZ8hnGTzuv
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQJ8BAEBCgBmBQJYT4beXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRFRUIyOTg2QzMwNjcxRTc0RTY1QzIyN0Ux
NkE1OTdBMEU0QTIwQjM0AAoJEBall6Dkogs0dh0QAIvLQ91q08Bq0xEMXJpcA0uD
A4aXZSZXVfIZ2yIn3hLXwdp7WJHfzpgoeYMhAuv1dq2fmEu4Yt9JyY1mus9FCPPP
Q8AauacE+vp9MIYspdwTIC/47xBC6D+VjIxUbjgMhKwdXRgqEOt6dWnIAXgzvyCy
osP/lp6p0meIsItM1ymF5QHijXuEi343Iy+J0inMeofzdj4C/Hk66QAJ58xMl6aJ
pVE3g8UdCEpDwMTsz3+eM7OzUCr+/Pse0OUAYJfwj6kJiTjSK9WfEXLuhiLFg9JY
sM1VFlA+R7387+EWdfvooQLm7NcgsaRdATtj2Y1V0MINRONf1pCN7PWV2a4JPvbn
dhtejm1c1GWpTgswmyy/GrHedS1wGValcCKAWfWIjGV9e1iMXpIAcuTEr3gxYaML
YNIoOFU4+ZudyHkgg7my4JtuTRv+3kbpq2tPqGoWpZuxqQ+gaYN20EdPgm39sTPg
XXHiDaJYvJSDHwaQyzKADpDaeuN9PXNoZHhP1drs6RtY6s9+deeWFiegwT9KaEI1
SOAe8g1hgZNvlYuwsBbLy+dgqigwCVARnUpXoDQKyuHnt1L2Tc+mAohvVK38T/91
6rwkETOzNs6miDURJLlbxUE5wVPWN0/0+S9o2vNh4dvHYyCIDMxoDASIigYmcnTV
d8hIo2kkvKhEGE6ioa7v
=9J41
-----END PGP SIGNATURE-----

--Md/poaVZ8hnGTzuv--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20161213052759.GP61036>