[Patch] Using sysctl(8) to acquire info from different systems
uspoerlein at gmail.com
Sun May 18 18:32:20 UTC 2008
On Mon, 12.05.2008 at 13:09:01 -0700, David Wolfskill wrote:
> In my case, I believe it would be useful to provide an ability to tell
> sysctl(8) to report on everything asked for that it does know, and
> ignore the OIDs it doesn't know.
> Is this percpetion so radical that I'm way off base? If so, please
> educate me as to why.
> Otherwise, I'll plan on filing a PR with the attached patch, which adds
> "-i" to sysctl(8)'s flags -- and which appears to work as described above:
I find this functionality very useful, but the addition of another flag
as problematic. First of all, old releases don't have it. Secondly, the
behaviour you describe should be the default anyway (IMHO).
So, when requesting OID a, b, and c, sysctl should print a, a warning
that it cannot find OID b (to STDERR), then print c and exit with a
return code != 0.
At least, that's what I would code it to do.
It is better to remain silent and be thought a fool,
than to speak, and remove all doubt.
More information about the freebsd-hackers