[rrd-users] y-axis scaled/averaged
Alex van den Bogaerdt
alex at ergens.op.het.net
Mon Jan 7 14:47:37 CET 2008
On Mon, Jan 07, 2008 at 01:58:42PM +0100, Stijn Deroo-Van Maele wrote:
> I created a rrd database with following command:
> *rrdtool create plays.rrd --step=300 DS:plays:GAUGE:600:U:U RRA:AVERAGE:0.5
> :1:2016*
>
> So I keep 2016 samples, every 5 minutes. Which means I have a history of 7
> days.
>
> When I create a graph like this:
> *rrdtool graph stats.png -a PNG --vertical-label "Number" --start "-1day"
> DEF:test=plays.rrd:plays:AVERAGE AREA:test#FF0000:"Number of PLAY's"*
> All the data is shown correct.
>
> But when I create on the same database a graph like this:
> *rrdtool graph stats.png -a PNG --vertical-label "Number" --start "-7day"
> DEF:test=plays.rrd:plays:AVERAGE AREA:test#FF0000:"Number of PLAY's"*
> Then the data isn't correct anymore. It's like all values on the y-axis are
> scaled (or an average of the data is shown)
>
> How is this possible? Why can't I get the real vallue (instead of an
> average). According to me, the '1' in *AVERAGE:0.5:1:2016* means there will
> not be taken an average on the data.
>
> Any answer on this would help me a lot!
You forgot to add "--width 2016" to the set of parameters for
rrdtool graph. You may also need to set a specific end date.
This would be something like:
endtime=$(rrdtool last plays.rrd)
endtime=$((endtime/300*300))
rrdtool graph ... --end $enddate ...
--
Alex van den Bogaerdt
http://www.vandenbogaerdt.nl/rrdtool/
More information about the rrd-users
mailing list