From owner-freebsd-hackers@freebsd.org Tue Dec 13 05:29:48 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 21622C7564F for ; Tue, 13 Dec 2016 05:29:48 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pg0-x22a.google.com (mail-pg0-x22a.google.com [IPv6:2607:f8b0:400e:c05::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E0B9A150F for ; Tue, 13 Dec 2016 05:29:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-pg0-x22a.google.com with SMTP id f188so43626105pgc.3 for ; Mon, 12 Dec 2016 21:29:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=HcuZtrcP3wSorzbstyLJyVJUrJCSiGrEA3FFRl7Qv38=; b=Vqry6SopsE6LfdOi34ysEzQnrc/yy1vjEz4wHmMPqgPB26uuUCuV71FUMoxZnzzfkx luZd00mj/p6UKw1Cdbl7VjbWEvuxEEX995GCrH5AYtwQrtvSHhaGjMcBWtANV1zCaDLm 3znT2fGRDzzvaIhXeBEL9mAGswj4lnFBwn/0qYwgdfvBfrV2HfVfcnRThtXENzyF+g6I VcihgCZ6lS5ILPHiJD1+xLMk2tuymvErMipQUtq1fy5Hs7u4GSAKy7Y+dES5IdVN4mHB xxSvYhA4viRY1hBpPqeLAk8o3pLjlBEFlXkAzpobirV+zO8zH0t3EDuhlO0HnI0sT4z8 +sqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=HcuZtrcP3wSorzbstyLJyVJUrJCSiGrEA3FFRl7Qv38=; b=R2M8/yl1n9GnBTnTOUmL4uKrQlb45l+Iyo6yViebfsAPK1vYMhgdw2XagdEExvJzBd YKrOmSjcEYq5VX8DQdoJroUKZgTME183I+kvMZIw7RKuL2aUxsqibRG/62dhEUfcHjeN 04jgg1MnpfK2WSBlnexcVtDOR42DC1nChGitSa48jU2TWyNCWxHf3jiccHkHjQ7ax5V5 vUFniWa5cZjAObopKmFoZWiBhwnzO2OWAenqEZDqWjHyiz+TDHN/7wJX8tYTYeDunm7+ yslN0N3D4yNAs8KiR47xCMHNN/5HHiMatHeOcQIbmA7fW2kxxb8kBjtIFqrgZhdL2Ucj UqYA== X-Gm-Message-State: AKaTC01ojljOMnnVd0d/cHLAuT+ORJvvSmOfLSXxpvL4bndiM3z5rbW8vz/HyafS2lZpuQ== X-Received: by 10.84.217.216 with SMTP id d24mr193732355plj.10.1481606987405; Mon, 12 Dec 2016 21:29:47 -0800 (PST) Received: from bhwl-mwheet2.corp.netflix.com ([69.53.245.200]) by smtp.gmail.com with ESMTPSA id s65sm79307385pgb.25.2016.12.12.21.29.46 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Dec 2016 21:29:46 -0800 (PST) Subject: Re: Sysctl as a Service, or: making sysctl(3) more friendly for monitoring systems Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_15F5C561-94BD-43D4-A6BE-9BDA98F3F57C"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail From: Warner Losh In-Reply-To: <20161213052759.GP61036@server.rulingia.com> Date: Mon, 12 Dec 2016 22:29:44 -0700 Cc: Warner Losh , Ed Schouten , FreeBSD Hackers Message-Id: References: <200A5D70-24CE-4843-B99D-E10A2AF4F68F@FreeBSD.org> <20161213052759.GP61036@server.rulingia.com> To: Peter Jeremy X-Mailer: Apple Mail (2.3124) X-Mailman-Approved-At: Tue, 13 Dec 2016 12:12:31 +0000 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2016 05:29:48 -0000 --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 wrote: >=20 > On 2016-Dec-12 17:57:07 -0700, Warner Losh wrote: >> On Mon, Dec 12, 2016 at 6:34 AM, Ed Schouten 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--