From owner-freebsd-arch@FreeBSD.ORG Wed Apr 3 18:15:54 2013 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8C92C3B0; Wed, 3 Apr 2013 18:15:54 +0000 (UTC) (envelope-from alfred@ixsystems.com) Received: from mail.iXsystems.com (newknight.ixsystems.com [206.40.55.70]) by mx1.freebsd.org (Postfix) with ESMTP id 62112604; Wed, 3 Apr 2013 18:15:53 +0000 (UTC) Received: from localhost (mail.ixsystems.com [10.2.55.1]) by mail.iXsystems.com (Postfix) with ESMTP id 7CC05611B4; Wed, 3 Apr 2013 11:15:53 -0700 (PDT) Received: from mail.iXsystems.com ([10.2.55.1]) by localhost (mail.ixsystems.com [10.2.55.1]) (maiad, port 10024) with ESMTP id 63211-02; Wed, 3 Apr 2013 11:15:53 -0700 (PDT) Received: from Alfreds-MacBook-Pro-9.local (unknown [10.8.0.26]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.iXsystems.com (Postfix) with ESMTPSA id DA058611AE; Wed, 3 Apr 2013 11:15:52 -0700 (PDT) Message-ID: <515C71CC.3090908@ixsystems.com> Date: Wed, 03 Apr 2013 11:15:40 -0700 From: Alfred Perlstein User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: [CFR][CFT] counter(9): new API for faster and raceless counters References: <20130401115128.GZ76816@FreeBSD.org> <20130402232606.GC1810@garage.freebsd.pl> <20130403002846.GB15334@onelab2.iet.unipi.it> <20130403100401.GA1349@garage.freebsd.pl> <515C68B5.2010006@ixsystems.com> <515C6E3A.9020300@ixsystems.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: arch@freebsd.org, Gleb Smirnoff X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Apr 2013 18:15:54 -0000 On 4/3/13 11:07 AM, Adrian Chadd wrote: > On 3 April 2013 11:00, Alfred Perlstein wrote: > >> One thing to note, the CSV format: >> COLNAME1,COLNAME2,COLNAME3 >> DATA1,DATA2,DATA3 >> >> is vulnerable to problems where a new column will spring into being due to >> loading of a kernel module/driver/something. >> >> Imo it's better to look at XML or some other pseudo-CSV like: >> COLNAME1:DATA1,COLNAME2:DATA2,COLNAME3:DATA3 >> so that we are OK with columns springing into existence or leaving. > Only if its parsed badly. :-) > > CSV in the above format should be parsed fine, because your parser > should _first_ establish the column->name mapping and use that moving > forward. It just so happens that most people don't bother with that. > > But yes. My (vague) plan with libstatfoo or something else was to > convert Sam's tools to use a base system library and then implement > optional data output filters. (Optional because I may not want them > all on my ridiculously slim embedded stuff.) But the general output > (CSV, human-readable) should be there by default. > > Hell, if we're going down this path, it's almost worth suggesting that > the tools should only output machine-parsable output and some _other_ > tool should translate that into human-readable. But that may be a bit > too radical.. > > > Thanks, > > > Adrian You're not hearing me. How do you xlate sysctl-a when a module being loaded/unloaded can cause mibs to appear/disappear. Your choice with the former format is: 1) case where new mib appears -> ignore it 2) case where mib disappears -> give it some absurd value (nul?) I'm more concerned with #1. -Alfred -Alfred