From owner-freebsd-hackers@FreeBSD.ORG Tue May 20 19:22:02 2014 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7BE72FF for ; Tue, 20 May 2014 19:22:02 +0000 (UTC) Received: from mail-qg0-x22a.google.com (mail-qg0-x22a.google.com [IPv6:2607:f8b0:400d:c04::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 88CF027F8 for ; Tue, 20 May 2014 19:22:02 +0000 (UTC) Received: by mail-qg0-f42.google.com with SMTP id q107so1526255qgd.15 for ; Tue, 20 May 2014 12:22:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=oKf2YfN/XhFrel8S0Ypn0YmXlkKCQ42Ki/s926KgmcQ=; b=ft1Kbw+wpTY93NEu7tlp5KBSVGJVbM/XCFjq2NNwgg/S+PM3gpTYuhrH8DhypdQpqU aE2YGRdmTPTp0zxyjA25z64e49qZ3wEqp/Amch/n0vGmsh7kBpRwaTsH+3Y5FHrXYd4D raSCsiOAORmCgfNi7ACsQnliEwF10KAIglE+EkJx6dDw6mwstUNieZtI6vttsBKhwewF rHyUdSvVBBd70Y0F/KbVKZ/KzLvEV1uBo1SzY1GcCGMeYJCQMJCvU/exJ1lJWdLb3nxc CbeOuVpwcU/ED77dpzCYx0HhQ5ghzp6RhIDiaF1ay/wEYt7hBVdRaC+SpNMTM8Nn/2tv q+aw== MIME-Version: 1.0 X-Received: by 10.229.198.2 with SMTP id em2mr53118854qcb.21.1400613721713; Tue, 20 May 2014 12:22:01 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.191.201 with HTTP; Tue, 20 May 2014 12:22:01 -0700 (PDT) In-Reply-To: <49E9736E-AD14-4647-8B15-30603D01360C@mail.bg> References: <49E9736E-AD14-4647-8B15-30603D01360C@mail.bg> Date: Tue, 20 May 2014 12:22:01 -0700 X-Google-Sender-Auth: GogpUvLAcAtUveKLFY5jv5niTi4 Message-ID: Subject: Re: [GSoC] Machine readable output from userland utilities From: Adrian Chadd To: Zaro Korchev Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-hackers@freebsd.org" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 May 2014 19:22:02 -0000 Hi! So I imported libstatfoo from Sam Leffler into base, specifically for this kind of purpose. What I'd like to do is extend this and incorporate it into existing tools like vmstat, iostat and such. That way we can then just teach libstatfoo about XML, or JSON - and then the tools all inherit it. -a On 20 May 2014 09:59, Zaro Korchev wrote: > I'm working on the project "Machine readable output from userland utiliti= es" and I want to share my ideas and thoughts. > > Here is the wiki page of the project: > https://wiki.freebsd.org/SummerOfCode2014/MachineReadableFromUserlandUtil= s > > I'm planning to create a unified output abstraction in the form of a libr= ary. The tools supporting the machine-readable output feature will write ou= tput exclusively using the library. The exact output format will be customi= zable. Several backend libraries (like libucl and libnv) can be used to imp= lement different formats. > Such library can either be compiled statically into each application or l= inked dynamically (depending on space/performance/versioning and other cons= iderations). > Each tool will have to be modified to support the new output mechanism. T= hese modifications could trivially be turned on and off using a macro switc= h. > One issue that must be considered is how to manage long outputs since it = may not be possible to store all data in memory. This would happen rarely b= ut can still be a problem. Probably the easiest way to solve this is to add= streamed dumping capability into the underlying libraries. > > Do you have any suggestions or ideas? > > > Thank you, > Zaro > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org= "