<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>apt-get install librrds-perl<br>
<br>
vim exportrrd2csv.pl<br>
<br>
#!/usr/bin/perl<br>
<br>
use RRDs;<br>
user warnings;<br>
use strict;<br>
<br>
my $fstart = time - 3600;<br>
my ($start,$step,$names,$rrddata) = RRDs::fetch($file,
"--start=$fstart", "AVERAGE");<br>
my $ERR=RRDs::error;<br>
<br>
open CSV, ">rrd.csv";<br>
<br>
foreach my $line(@rrdata) {<br>
<br>
//do sth with data array<br>
<br>
print CSV "$line[0],$line[1]\n";<br>
}<br>
<br>
close CSV;<br>
<br>
------------------<br>
<br>
use it as a sample code and configure your params for RRDs::fetch<br>
<br>
hope that helps.<br>
<br>
Kind regards,<br>
Michael<br>
</tt><br>
Mohandas K wrote the following on 15.06.2009 10:12:
<blockquote
cite="mid:OFF9474F04.3182DDFD-ON652575D6.002B9B70-652575D6.002D0F58@tcs.com"
type="cite"><br>
<font face="sans-serif" size="2">Hi,</font>
<br>
<br>
<font face="sans-serif" size="2">I am using RRDTOOL 1.2 to create
graphs
for memory utilization, CPU utilization etc. Now using this RRD data I
need to create CSV file. So can anyone tell me how can I export these
RRD
data to CSV file. Any kind of help would be really appreciable. </font>
<br>
<br>
<font face="sans-serif" size="2">Thanks & Regards,<br>
Mohandas Kudva K<br>
Mailto: <a class="moz-txt-link-abbreviated" href="mailto:mohandas.k@tcs.com">mohandas.k@tcs.com</a><br>
</font>
<pre>=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
</pre>
<pre wrap="">
<hr size="4" width="90%">
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
<a class="moz-txt-link-freetext" href="http://p.sf.net/sfu/businessobjects">http://p.sf.net/sfu/businessobjects</a></pre>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Nagios-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/nagios-users">https://lists.sourceforge.net/lists/listinfo/nagios-users</a>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
DI (FH) Michael Friedrich
<a class="moz-txt-link-abbreviated" href="mailto:michael.friedrich@univie.ac.at">michael.friedrich@univie.ac.at</a>
Tel: +43 1 4277 14359
Vienna University Computer Center
Universitaetsstrasse 7
A-1010 Vienna, Austria
</pre>
</body>
</html>