[rrd-users] problem with values when using width
Tobias Oetiker
tobi at oetiker.ch
Mon Jan 7 21:57:48 CET 2008
Hi Andreas,
the reason for this is that the numbers below the graph do
represent what is IN the graph, by using a different with you
influence the number of pixles in the graph ... with your cdef you
flip values between unknown and 0 ... together I would assume that
this is able to produce said effect (0.1 % difference) ...
cheers
tobi
Today Andreas Horndasch wrote:
> Hi everybody,
>
> since four days I have problems using rrdtool with width and average.
>
> When i drow a graph with a width the result is an other as the result of a graph without width...
>
> For example:
> Using width value is: 99,92
> Not usind width value is: 99,82
>
> The start und the end values are the same.
>
>
> I created my database with:
> <---
> RRDs::create($rrdpfad, "-b 1016182000", "-s 60", "DS:values:GAUGE:1800:U:U",
> "RRA:AVERAGE:0.5:1:12096",
> "RRA:AVERAGE:0.5:6:17520");
> <---
>
> To get the values I use:
> <---
> my ($averages, $xsize, $ysize) = RRDs::graph("$bild", "--imgformat", "PNG", "--start", "$start","--end","$end",
> "--title= Values in Prozent",
> "DEF:values=/opt/rrd/verfuegbarkeit/".$host.".rrd:values:AVERAGE",
> "CDEF:ava=values,UN,0,values,100,*,IF",
> "LINE2:ava#0000FF:Verfügbarkeit",
> "GPRINT:ava:AVERAGE:Verfügbarkeit im Zeitraum\\: %3.2lf%s \\j",
> "COMMENT:$von - $bis"
> );
> <---
>
> OR (with width)
>
> <---
> my ($averages, $xsize, $ysize) = RRDs::graph("$bild", "--imgformat", "PNG","-w 10000", "--start", "$start","--end","$end",
> "--title= Values in Prozent",
> "DEF:values=/opt/rrd/verfuegbarkeit/".$host.".rrd:values:AVERAGE",
> "CDEF:ava=values,UN,0,values,100,*,IF",
> "LINE2:ava#0000FF:Verfügbarkeit",
> "GPRINT:ava:AVERAGE:Verfügbarkeit im Zeitraum\\: %3.2lf%s \\j",
> "COMMENT:$von - $bis"
> );
> <---
>
>
> Using the width of 10.000 will give a bedder result...
>
> But this result could not be printed in an htmlpage...
>
>
> Some ideas how to get the best result without using width?
>
>
> Thanks for help.
>
> Andreas
>
> _______________________________________________________________________
> Jetzt neu! Schützen Sie Ihren PC mit McAfee und WEB.DE. 30 Tage
> kostenlos testen. http://www.pc-sicherheit.web.de/startseite/?mc=022220
>
>
--
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten
http://it.oetiker.ch tobi at oetiker.ch ++41 62 213 9902
More information about the rrd-users
mailing list