Hi Sanjit,<div><br></div><div>I am successfully using the perl module RRDTool::OO for this purpose. Something like the following would print values between the two time stamps given on the command line as parameters:</div>
<div><br></div><div><div>#!/usr/bin/perl</div><div>use RRDTool::OO;</div></div><div>$rrd = RRDTool::OO->new( file => "rrdfile.rrd" );<br><div>$rrd->fetch_start(</div><div> start => @ARGV[0],</div>
<div> end => @ARGV[1],</div><div> resolution => "300",</div><div> cfunc => "MAX"</div><div> );</div><div>$rrd->fetch_skip_undef();</div></div><div><div>while(my($time, @value) = $rrd->fetch_next()) {</div>
<div> print "$time:",sprintf("%.2f", $value[0]),"\n" if $value[0];</div><div> print "$time:",sprintf("%.2f", $value[1]),"\n" if $value[1];</div><div>}</div></div>
<div><br></div><div><div class="gmail_quote">On Wed, Jul 7, 2010 at 8:44 PM, Sanjit Jhala <span dir="ltr"><<a href="mailto:sjhalaz@gmail.com">sjhalaz@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I want to fetch the data for some specific statistics in the RRD and graph them with my own graphing tool instead of rrdgraph. Is it possible to fetch a particular statistic stored in the rrdtool database using something like rrdfetch? <br>
<br>As I understand it rrdfetch fetches values for all the variables stored in RRD. Looking at rrdgraph it allows me to graph a specific stat without having to fetch values for all the stats. Is it possible to fetch just one or a specific set of statistics that I am interested in instead of all of them?<br>
<font color="#888888">
<br>-Sanjit<br>
</font><br>_______________________________________________<br>
rrd-users mailing list<br>
<a href="mailto:rrd-users@lists.oetiker.ch">rrd-users@lists.oetiker.ch</a><br>
<a href="https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users" target="_blank">https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users</a><br>
<br></blockquote></div><br></div>