From owner-freebsd-arch@FreeBSD.ORG Wed Apr 3 18:07:08 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 07713EFF; Wed, 3 Apr 2013 18:07:08 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [IPv6:2a00:1450:400c:c05::22a]) by mx1.freebsd.org (Postfix) with ESMTP id 694823C8; Wed, 3 Apr 2013 18:07:07 +0000 (UTC) Received: by mail-wi0-f170.google.com with SMTP id hm11so4626275wib.1 for ; Wed, 03 Apr 2013 11:07:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=2r5hOHKvnp41558IKcK6OxcPsgRGiLCp9174cpGBxRE=; b=cKMZ/nmB0QLHYU712SRU5Yt8xWvqAXN11PfzOuxZkJBfG8QJc/0d1wJcSNzFWw4rGo tMxTlUq1uxFbVbeiSOnfowND7pD3KI46Q0jszRN2JvlU7I7Wh5EH6CTis6h87t/Bb/h4 H3MHM5hxAe+EvZfFWySUl9+NTULE812xNWDhijI9MrqX+goMhN91ThBuL7SjvcFIf3Z5 iaymYrphLyGv4AHJ4DUBiPdBPd5YSQZjDs5+bOI4QdwdVpx3/sEPvCNaPySJsaWa/ukY bMbAsi+R6rORtxzM11NHj0Vl4GAeYUcP3wK14Rna2gThMSRUa/WqwSSM9gQBA99N40um kR/Q== MIME-Version: 1.0 X-Received: by 10.180.94.135 with SMTP id dc7mr24301449wib.11.1365012426095; Wed, 03 Apr 2013 11:07:06 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.216.243.7 with HTTP; Wed, 3 Apr 2013 11:07:05 -0700 (PDT) In-Reply-To: <515C6E3A.9020300@ixsystems.com> 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> Date: Wed, 3 Apr 2013 11:07:05 -0700 X-Google-Sender-Auth: Ix1KDTvYI8j1dAugERMWwD9iQiA Message-ID: Subject: Re: [CFR][CFT] counter(9): new API for faster and raceless counters From: Adrian Chadd To: Alfred Perlstein Content-Type: text/plain; charset=ISO-8859-1 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:07:08 -0000 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