[rrd-users] on-the-fly graph generation

Raimund Berger raimund.berger at gmail.com
Sun Jul 20 22:49:28 CEST 2008


Simon Hobson <linux at thehobsons.co.uk> writes:

> I wrote:
>
>>In effect, I need to do something like :
>>
>>rrdtool graph <file> `cat ${Tempfile}`
>>
>>which doesn't work - and I'm sure this will be something trivial !
>
> And it was something trivial :-/
>
>    eval "rrdtool graph ${GraphDef}"
>
> does the trick. I've modified my script to build the graphing 
> parameters up in a variable rather than use a file on disk.

I guess this went without response because it was an obvious shell
scripting issue, and really not about rrdtool anymore. For example, a
followup question could have been what shell you use etc etc

I was wondering though what went wrong with your example. Without
further testing my guess was the line breaks though.

If so, could be
 params=`cat file`
 rrdtool graph $params
might also work. The shell word splitting on that unquoted $params
should, to the best of my knowleddge, also remove any remaining line
breaks.

Anyway, glad to hear you sorted it out.



More information about the rrd-users mailing list