[rrd-users] Using RRDTool in C App - Graph not being produced nut no error

Travis Spencer travislspencer at gmail.com
Mon Feb 26 18:41:14 CET 2007


On 2/25/07, Mark Easton <mark.easton at azurebell.co.nz> wrote:
...
> But when I create the graph image I get no errors and no image file is
> created.
...
>                 sprintf(argstr, "temp.png --start %ld --end %ld
> DEF:mytemp=gopher.rrd:temp:MAX", (long)seconds1, (long)seconds2);

I think it is because you don't have a PRINT or GPRINT statement.

Try this and see if it works:

sprintf(argstr, "temp.png --start %lu --end %lu"
    "DEF:mytemp=gopher.rrd:temp:MAX "
    "GPRINT:min:MAX:Max Temperature %%8.3lf %%s",
    seconds1, seconds2);

Note that the double percent signs are for sprintf not RRD.  I would
suggest that you get things to work w/ RRDTOOL from the command line
first.  Then, write the C code.

-- 

Regards,

Travis Spencer



More information about the rrd-users mailing list