Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Dec 2016 22:29:44 -0700
From:      Warner Losh <wlosh@bsdimp.com>
To:        Peter Jeremy <peter@rulingia.com>
Cc:        Warner Losh <imp@bsdimp.com>, 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:  <B9B40604-B8E6-42A8-B5CB-41EDAE025911@bsdimp.com>
In-Reply-To: <20161213052759.GP61036@server.rulingia.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> <20161213052759.GP61036@server.rulingia.com>

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

--Apple-Mail=_15F5C561-94BD-43D4-A6BE-9BDA98F3F57C
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii


> On Dec 12, 2016, at 10:27 PM, Peter Jeremy <peter@rulingia.com> wrote:
>=20
> 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
>>>=20
>>> If our sysctl tree would get substantially larger at some point, we
>>> should of course revisit this.
>>=20
>> That sounds cool. I'd love to see what you came up with to get those =
results.
>=20
> I think that's impressive as well.
>=20
>> 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.
>=20
> 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.

It does if you had a read-channel :)

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

True.

Warner


--Apple-Mail=_15F5C561-94BD-43D4-A6BE-9BDA98F3F57C
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP using GPGMail

-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org

iQIcBAEBCgAGBQJYT4dJAAoJEGwc0Sh9sBEAkpMQAOBhtysDd5i/F68ZAexjHOHb
CTeFvurGrJiLxygoJKHavuT5m+Onf8Oz4/zAFokw2Tcxe1wBtBlR6buAZ7Wqfo6S
T6rmVPWP5U26F+mDWB57taqHPg5Ja8AfVvFTqSQi5wDGm0MvhhaH4w8MikgFOJ/l
B2AlwJqFE7v/RLexpH7q57glPJY5Jj06OpDSIP2c4LaS+/8Mb2qZzoEHs8rNrBtk
J0a36M1yAzp7sS7gO7zXJ0mH94xOojCl8p/AI+hQZV7bedk08YMQoetC+ZTIb/3n
bA8nr1d8uxUJ8PSRGZX+FkuBefMb+Cc63VkMH9TvARf70ee6nSQYa1PVWofhssy9
7tkArgbKtQrg5pQEVmC8BOnHj28H7Ae3FEu8Esst945UTJa+pb3ZGustGdj9zwcL
OK4EfGVTGN4EXPgqw6Ym/HPp28R+uz5RItPlpxannqaGTdJGvE0WMihUB7TAPAi2
IStamgs2wPY7BCZ5ixZQLbd5c0vF2jKoNDWIiGWnMqF98boSX+s5l0Gk+g6MDE8W
lTA+lY0Je+XZFBKsFbEoUDH9pKTUUWKRbc1PRY4AgmOA6gRC2qD6dSHJmfXCP5yT
XPlZN6q99TL8fP1pLgsl1pk1CjsD+BZq6D+2AE+tvGU/xAXKRVcUEAZv0SO9Sdrt
Wy+lHinIFFRsbjENICeA
=0KpV
-----END PGP SIGNATURE-----

--Apple-Mail=_15F5C561-94BD-43D4-A6BE-9BDA98F3F57C--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B9B40604-B8E6-42A8-B5CB-41EDAE025911>