From owner-freebsd-hackers@FreeBSD.ORG Sun May 18 18:32:20 2008 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1677610656C2 for ; Sun, 18 May 2008 18:32:20 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.185]) by mx1.freebsd.org (Postfix) with ESMTP id 8B19A8FC17 for ; Sun, 18 May 2008 18:32:19 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: by fk-out-0910.google.com with SMTP id k31so1582531fkk.11 for ; Sun, 18 May 2008 11:32:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:received:received:date:from:to:cc:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; bh=6do2/KRBnidLn6Yphma4Otdmb3IC2V+gblcAl/654Zo=; b=kCo1FdCMbPJ10vMHmK9rkhZYbfQ00i0JM9gVVBORA3lDw0rQ1n93bhUFuilVIqHTWNeF2g9AoV5N8yNC+BtMadJv2gRy4VDzidDVUy8dWI/abvSjALiH+rbVruT6R1PijoOXgpa4ZuhmGly80cL0qf33bsKANgkF+CSnztvGjUg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=PKnPrAm08Sa81dh76pX6nQDpyUrTX9l3zVMCkzFILAGuiTOHLLjfO8rvmijXl42A/OO/6aUKllSd1tbtDKSyXWZEkm5oyzpqWbuC+1HsizcHLBSKfmkaM7o6M5VKGMhlGwfzGPdyjcWScGO7w3LJuqGAl4PfzDUpjIzTOPY213Y= Received: by 10.125.111.15 with SMTP id o15mr5104126mkm.127.1211133827179; Sun, 18 May 2008 11:03:47 -0700 (PDT) Received: from acme.spoerlein.net ( [217.172.44.86]) by mx.google.com with ESMTPS id 4sm7311583fgg.6.2008.05.18.11.03.45 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 18 May 2008 11:03:46 -0700 (PDT) Received: from roadrunner.spoerlein.net (e180148079.adsl.alicedsl.de [85.180.148.79]) by acme.spoerlein.net (8.14.2/8.14.2) with ESMTP id m4II3gip035558 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 18 May 2008 20:03:44 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Received: from roadrunner.spoerlein.net (localhost [127.0.0.1]) by roadrunner.spoerlein.net (8.14.2/8.14.2) with ESMTP id m4IH9bkC003625 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 18 May 2008 19:09:37 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Received: (from uqs@localhost) by roadrunner.spoerlein.net (8.14.2/8.14.2/Submit) id m4IH9ap7003624; Sun, 18 May 2008 19:09:36 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Date: Sun, 18 May 2008 19:09:36 +0200 From: Ulrich Spoerlein To: David Wolfskill Message-ID: <20080518170936.GB1797@roadrunner.spoerlein.net> Mail-Followup-To: David Wolfskill , hackers@freebsd.org References: <20080512200901.GL66703@bunrab.catwhisker.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080512200901.GL66703@bunrab.catwhisker.org> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: hackers@freebsd.org Subject: Re: [Patch] Using sysctl(8) to acquire info from different systems X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 May 2008 18:32:20 -0000 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: Hi David, 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. Cheers, Ulrich Spoerlein -- It is better to remain silent and be thought a fool, than to speak, and remove all doubt.