[rrd-users] Creating dynamic graphs in HTML

Rene Fritzsche Rene at deinheld.de
Thu Nov 22 12:16:21 CET 2007


Its not about "stucturing" arguments or things like that...
you need to change the output-mode of your STDOUT-queue to binary..
this seems to be necessary on some systems (dont ask why, but i had
to do this on Debian and on FreeBSD...)

the second solution wont work either on systems like this - so
i replaced the following lines

> print $cgi->header(-type=>'image/png');
> RRDs::graph...


print "Content-type: image/png\n\n";
binmode STDOUT

> This basically works for me (rrdtool-1.2.12).  I structure my arguments
> a little differently for readability, but I use "-" for output and it
> works.  For reference here is my code:
> RRDs::graph(@args, @DEFS, @DRAW, @GPRINTS);

>> print $cgi->header(-type=>'image/png');
>> RRDs::graph ("-","-s","-1week","-a","PNG","--width","600","--
>> height","400","DEF:vtot=file.rrd:total:MAX","AREA:vtot#00FFFF:Total","DE
>> F:vused=file.rrd:active:MAX","AREA:vused#0000FF:Used");


Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!

More information about the rrd-users mailing list