Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Dec 2016 21:35:42 +1100
From:      Peter Jeremy <peter@rulingia.com>
To:        Jonathan Anderson <jonathan@FreeBSD.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Sysctl as a Service, or: making sysctl(3) more friendly for monitoring systems
Message-ID:  <20161212103542.GN61036@server.rulingia.com>
In-Reply-To: <200A5D70-24CE-4843-B99D-E10A2AF4F68F@FreeBSD.org>
References:  <CABh_MKk87hJTsu1ETX8Ffq9E8gqRPELeSEKzf1jKk_wwUROgAw@mail.gmail.com> <eea0aa41-2bbc-0ddc-d951-f495c5ba2341@freebsd.org> <200A5D70-24CE-4843-B99D-E10A2AF4F68F@FreeBSD.org>

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

--U+BazGySraz5kW0T
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2016-Dec-11 16:42:38 -0330, Jonathan Anderson <jonathan@FreeBSD.org> wro=
te:
>I, for one, agree, and at the risk of being slightly provocative, I=20
>think it could be taken even further. :) I'd love to be able to retrieve=
=20
>a sysctl entry or subtree as an nvlist_t. Rather than doing lots of=20
>system calls to enumerate clearly-related sysctl values, it would be=20
>very cool to do one system call and then inspect the resulting data=20
>structure in memory. We already use libnv in a number of places, and it=20
>seems like it could be a natural mapping from the sysctl hierarchy.

This is just pushing the work from userland to the kernel.  There's no
sysctl tree in the kernel that can be readily exported as a nvlist -
the kernel would need to iterate through the hierarchy and build the
tree.  The only advantage of this approach is that a client only needs
to perform a single syscall.  IMO, this is the wrong approach - where
practical, functionality should be in userland, not in the kernel.

--=20
Peter Jeremy

--U+BazGySraz5kW0T
Content-Type: application/pgp-signature; name="signature.asc"

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

iQJ8BAEBCgBmBQJYTn1+XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRFRUIyOTg2QzMwNjcxRTc0RTY1QzIyN0Ux
NkE1OTdBMEU0QTIwQjM0AAoJEBall6Dkogs0P18P/ixlj+0H68Og5xbc7F7ARohd
+UNN+OPg3UJxQc9iHzc8IOkvbuaarWPN2RB4zTDl3Pr5pOjTCGkhJEV8shXyhQHS
WhMXG+DXuXlShc1oMoJvZcQNZVM2N4G8idIMfWfCdeNT/cTq45J9A9/T9SRntcoD
D6zy/1cChyo7soZlxIRKgSNt3xLzgw3jnvIYt39REqhod2p3Z0P239PbT1eO0VSg
e99mB8PcSRQBy9BsRX+Ci6mD9WCqdQ/TY7ReXVed3ZIWp49qSUPfBcVUKniSf+5M
HHja4NSAwE/VpuS4Iq0ABDKVejHanUDOuF3VudjOV7XiZ+vCb7v4tQP2UCYPANyF
NKNoECETia9AjvDE7sJcvcUWLy/DVUvyY91uMkPofGD4CX6Dkxzd4EvmcfhrlZPn
9CxHHWDmMrKH2K4M7sPEZb1msdrKlqLkIYRvvmRkwySCjGHpwyIi5IlMSeKF4+3m
WNItK48Ug4VsTGkcEp9C4uydws4BwqG7Tf5Mm2oQBxnW+bHBAhFGJpcO+weOWD7t
Dm4M3TsoilvVpnc7k8Gj+GweDbVOIk/xt3uoBVjfeTnLcjSUVvHaD58KiSsKtMJY
xaX+1JNfadD2qxblihlLOdyLxwMZfvbe7tUHk/bYS3T6VYj4RZq9Qvacq1iPzDLo
xu1qFlp8ZbMiJTAxIa5d
=Qw/4
-----END PGP SIGNATURE-----

--U+BazGySraz5kW0T--



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