[nycbug-talk] my sysctl quest
Jason Hellenthal
jhellenthal at dataix.net
Wed Feb 29 00:21:44 EST 2012
On Tue, Feb 28, 2012 at 04:57:35PM -0500, Isaac Levy wrote:
> Hi All,
>
Hi.
> In the spirit of the dmesg db, I need your sysctls!
>
> Off-list, just send me the output from:
> # sysctl -oa ; echo '--' ; dmesg
>
> Or, if your host has local mail facility:
> # echo "`sysctl -oa ; echo '--' ; dmesg`" | mail -s "ike sysctl quest" ike at blackskyresearch.net
>
This is a nice idea and all and dont get me wrong, I am not against it,
but it would seem more beneficial in creating a structured SYSCTL_DESC
which would help in narrowing down what is already there and what is not
allowing to focus on given areas of interest. There might already be a
way to scope through the code for empty values of where the descriptions
have been left out but I just don't know about it.
Speaking purely of FreeBSD and sysctl(9):
grep -n SYSCTL_ /usr/src/sys/*/*
grasp the line numbers and file for further processing and the +- some
lines to grab extra context should get you pretty close to what needs to
be done.
static int sysctl_vm_phys_free(SYSCTL_HANDLER_ARGS);
SYSCTL_OID(_vm, OID_AUTO, phys_free, CTLTYPE_STRING | CTLFLAG_RD,
NULL, 0, sysctl_vm_phys_free, "A", "Phys Free Info");
Don't forget about "options NO_SYSCTL_DESCR" which would effectively
wipe all these out in a running kernel.
Anyway after all this these MiBs should be able to be enumerated in a
fashion that would yield better results than just recieving random
compilations from different systems. Just my opninion.
>
> --
> Why do I want sysctl dumps?!?
>
> Recently, I was reminded of how many times we've discussed sysctl documentation (and the lack thereof).
> (e.g. commonly, 'is FOO.sysctl in bits or bytes?' 'is that bootonly, or runtime-configurable?' etc...)
>
> Some other people have had this thought too:
> http://wiki.freebsd.org/IdeasPage#Document_all_sysctls
> I'm diving into this project.
>
> --
> Why I want your sysctls?
>
> I'm finding there's particular differences in architectures, hardware drivers, defaults which are different for different hardware resources, etc…
> I want to get an idea of the possible variance right up front, so, as many sysctl dumps as possible, from as many places as possible.
>
> Again, just send me the output from:
> # sysctl -oa ; echo '--' ; dmesg
>
> WARNING: you may divulge systems information which you don't want to, if so, don't send the sysctl at all! (After all, I am just some dude on a list!)
> Your sysctl info/values could eventually end up in public view, or shared with other developers. If so I'll do my best to anonomize the data, but if you have sensitive systems info, just don't send it.
>
> --
> What I want:
>
> I'm focused on FreeBSD, but NetBSD, OpenBSD, DragonFlyBSD, and even dumps from other UNIX'es are quite welcome to me right now. Jailed systems, Xen/VmWare/Etc instances, AWS systems, whatever. Running on an obscure architecture? Running legacy systems? Even better!
>
> --
> Later, I've got thoughts on what to *do* with the sysctl documentation, some way to collect and maintain docs across projects even.
> Perhaps a big man page will suffice. Perhaps some utility in the spirit of perror(1) would be more satisfactory.
>
> In the meantime, I want to get a good view of how much variance there actually is in sysctls themselves- and for that, I need data!
>
> Thanks in advance for any sysctls!
>
Good luck on your quest.
--
;s =;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 455 bytes
Desc: not available
URL: <http://lists.nycbug.org/pipermail/talk/attachments/20120229/932e90fa/attachment.bin>
More information about the talk
mailing list