From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-user+bounces-97607-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1MN81Q-0004yG-69
	for garchives@archives.gentoo.org; Sat, 04 Jul 2009 16:23:28 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 4C045E0676;
	Sat,  4 Jul 2009 16:23:26 +0000 (UTC)
Received: from mail-vw0-f177.google.com (mail-vw0-f177.google.com [209.85.212.177])
	by pigeon.gentoo.org (Postfix) with ESMTP id 2A65EE0676
	for <gentoo-user@lists.gentoo.org>; Sat,  4 Jul 2009 16:23:26 +0000 (UTC)
Received: by vwj7 with SMTP id 7so1948015vwj.32
        for <gentoo-user@lists.gentoo.org>; Sat, 04 Jul 2009 09:23:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:mime-version:received:in-reply-to:references
         :date:message-id:subject:from:to:content-type;
        bh=26dpB2vqINeUtmaNQW9qBrJN0cq+ibypTfSlmybm9OE=;
        b=KXZCyG4POLnOnOPeAJDn2e9urfWdzXOTwgwJxUnBXVMxvRTgHDaD4w1Xwc5waAOGbk
         e6MqJ76UIPqZTuKWsLQ4kqlEmVVxUrILtrDyUAjQCdzRfHVNo8931z3Lq8Nx8sCO7S8B
         Hz2EOuZkwZbypCCAuNvq2I8C8KiK2bckqnYEE=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type;
        b=RDhSv62fFs5OCk1gUUu8+eVrc6hXc/44lPE/ZIOmP7JPjI4obBkEyvJWz5lkq5GM6/
         UjtHVC5/Yq/h31Y4fOYs44SWsJg4f13Nw5v4J1TdaqOH2La5BsbxIACZwnCypW3o4G+L
         8n3V5K520X6tWAks860Oreda0tEd/7MfeJnec=
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@lists.gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
MIME-Version: 1.0
Received: by 10.220.85.67 with SMTP id n3mr5520015vcl.53.1246724605823; Sat, 
	04 Jul 2009 09:23:25 -0700 (PDT)
In-Reply-To: <200907041636.51868.michaelkintzios@gmail.com>
References: <200907041636.51868.michaelkintzios@gmail.com>
Date: Sat, 4 Jul 2009 12:23:25 -0400
Message-ID: <642958cc0907040923n5592c393t73b2df7196e1ec8d@mail.gmail.com>
Subject: Re: [gentoo-user] [OT] rrd to CSV
From: Mark Shields <laebshade@gmail.com>
To: gentoo-user@lists.gentoo.org
Content-Type: multipart/alternative; boundary=0016e6460710434db8046de3b13c
X-Archives-Salt: a8f6ca76-c1b0-4aaa-a2f4-746f58f76fd2
X-Archives-Hash: e3af25deb57e946eb809295fafe8a1df

--0016e6460710434db8046de3b13c
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

On Sat, Jul 4, 2009 at 11:36 AM, Mick <michaelkintzios@gmail.com> wrote:

> Hi All,
>
> I know that rrdtool dump will export the rrd data into XML, but is there
> something to either directly or via rrdtool create a CSV file for me?  Will
> probably want to run this on a cron job and email/save it.
> --
> Regards,
> Mick
>


Judging from a few cursory google searches, it won't output to CSV, but you
can easily convert it.  Try piping the file/output to these commands (yanked
from Cacti forums):
| grep -v NaN | grep '<row>' | tr e ' ' \
| awk {'print "Q"$2"qcq"$3"qcq"$9"Q"'} \
| tr Q '"' | tr c ',' | tr q '"'"


Haven't tested it, but looks like it should work.
-- 
- Mark Shields

--0016e6460710434db8046de3b13c
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Sat, Jul 4, 2009 at 11:36 AM, Mick <span dir=
=3D"ltr">&lt;<a href=3D"mailto:michaelkintzios@gmail.com">michaelkintzios@g=
mail.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi All,<br>
<br>
I know that rrdtool dump will export the rrd data into XML, but is there<br=
>
something to either directly or via rrdtool create a CSV file for me? =A0Wi=
ll<br>
probably want to run this on a cron job and email/save it.<br>
--<br>
Regards,<br>
<font color=3D"#888888">Mick<br>
</font></blockquote></div><br><br clear=3D"all">Judging from a few cursory =
google searches, it won&#39;t output to CSV, but you can easily convert it.=
 =A0Try piping the file/output to these commands (yanked from Cacti forums)=
:<div>
<br></div><div><div>| grep -v NaN | grep &#39;&lt;row&gt;&#39; | tr e &#39;=
 &#39; \</div><div>| awk {&#39;print &quot;Q&quot;$2&quot;qcq&quot;$3&quot;=
qcq&quot;$9&quot;Q&quot;&#39;} \=A0</div><div>| tr Q &#39;&quot;&#39; | tr =
c &#39;,&#39; | tr q &#39;&quot;&#39;&quot;</div>
<div><br></div><div><br></div><div>Haven&#39;t tested it, but looks like it=
 should work.</div><div>-- <br>- Mark Shields<br>
</div></div>

--0016e6460710434db8046de3b13c--