[rrd-users] Assign RRDGraph DEF variables to external variable?

Simon Hobson linux at thehobsons.co.uk
Sat Jun 21 09:59:06 CEST 2014


Md. Ali Ahsan Rana <aliahsanrana at gmail.com> wrote:

> 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?

You can't - at least not how you are asking.
What you can do is run through rrdtool graph but do not include any area, line, or gprint statements. If you use a PRINT (note the missing G) statement, then the value will be printed (to stdout IIRC) and you can capture it there. If you have multiple PRINT statements, then you'll get multiple results out.

So you might run through once to get some of these values, and then run through again to produce a graph - using these values to customise the graph.



More information about the rrd-users mailing list