<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">If you wish to access the RRDTool data programmatically from PHP, then you have two options.<br>
<br>
If you just want a few set values, you could call rrdtool using the PRINT directive to output text on stdout, and capture that, though you then have to parse the captured text.<br>
<br>
If you want to access the entire data series, then you could call 'rrdtool fetch' or 'rrdtool xport' to obtain the data; also, you could install the PHP RRDtool library, and then access it directly from the PHP code rather than having to fork off a separate
process and catch the output. This might be the most efficient way to achieve what you want.<br>
<br>
Steve<br>
<div><br>
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px"><strong>Steve Shipway</strong></div>
<div style="font-family:Tahoma; font-size:13px">University of Auckland ITS</div>
<div style="font-family:Tahoma; font-size:13px"><em>UNIX Systems Design Lead</em></div>
<div style="font-family:Tahoma; font-size:13px"><a href="mailto:s.shipway@auckland.ac.nz">s.shipway@auckland.ac.nz</a></div>
<div style="font-family:Tahoma; font-size:13px">Ph: +64 9 373 7599 ext 86487</div>
<div style="font-family:Tahoma; font-size:13px"><em></em> </div>
</div>
</div>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF289712"><font color="#000000" face="Tahoma" size="2"><b>From:</b> rrd-users-bounces+s.shipway=auckland.ac.nz@lists.oetiker.ch [rrd-users-bounces+s.shipway=auckland.ac.nz@lists.oetiker.ch] on behalf of Md. Ali Ahsan Rana
[aliahsanrana@gmail.com]<br>
<b>Sent:</b> Saturday, 21 June 2014 4:28 p.m.<br>
<b>To:</b> rrd-users@lists.oetiker.ch<br>
<b>Subject:</b> [rrd-users] Assign RRDGraph DEF variables to external variable?<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">Hello EveryOne,
<div><br>
</div>
<div>I am constructing and executing rrdgraph command from php. A sample is as follows:</div>
<div><br>
</div>
<div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left-width:1px; border-left-color:rgb(204,204,204); border-left-style:solid; padding-left:1ex">
$series = "DEF:'test'='$rrd_dir/test.rrd':'sum':AVERAGE "<br>
."LINE2:test#00FF00:'Test Graph' "</blockquote>
<div><br>
</div>
<div>Now, I want the rrd variable 'test' to be assigned to an external php variable so that I can use that value for other task. How I can achieve this please?</div>
</div>
<div><br>
</div>
<div>Regards</div>
<div>Rana</div>
</div>
</div>
</div>
</div>
</body>
</html>