Date: Mon, 12 Dec 2016 17:57:07 -0700 From: Warner Losh <imp@bsdimp.com> To: Ed Schouten <ed@nuxi.nl> Cc: Jonathan Anderson <jonathan@freebsd.org>, FreeBSD Hackers <freebsd-hackers@freebsd.org>, Allan Jude <allanjude@freebsd.org> Subject: Re: Sysctl as a Service, or: making sysctl(3) more friendly for monitoring systems Message-ID: <CANCZdfrjsLdMoZ9Eg19-mEbyxUefJxUmeq=cT_bagrJqzWnUOg@mail.gmail.com> In-Reply-To: <CABh_MKkAoTj4wA9oTz-fK0rokgMfuiUWpLt6t=qRXy6vvCh7rg@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>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 12, 2016 at 6:34 AM, Ed Schouten <ed@nuxi.nl> wrote: > Hi Jonathan, > > 2016-12-11 21:12 GMT+01:00 Jonathan Anderson <jonathan@freebsd.org>: >> Rather than doing lots of system calls to >> enumerate clearly-related sysctl values, it would be very cool to do one >> system call and then inspect the resulting data structure in memory. > > I'm not sure it's worth tackling this problem at this time. My current > version of the exporter is already pretty fast: > > $ 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 results. 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. Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfrjsLdMoZ9Eg19-mEbyxUefJxUmeq=cT_bagrJqzWnUOg>