[rrd-users] Using LAST on a CDEF

Yannick Marquet itcsoft54 at yahoo.fr
Mon Feb 25 00:07:54 CET 2013


Hello,

I think it's cause by this line :

CDEF:ds4ak=ds4a,UN,0,ds4a,IF
CDEF:ds4bk=ds4b,UN,0,ds4b,IF
CDEF:totala=ds0ak,ds1ak,+,ds2ak,+,ds3ak,+,ds4ak,+

Your CDEF make all UNK value are equal to 0, including uncollected data 
(data collect in the future)
Be careful, because if your display range ends after your last entry. 
Your UNK (uncollected) values are replace by 0.
So using LAST return 0.

Try to use ADDNAN 
(http://oss.oetiker.ch/rrdtool/doc/rrdgraph_rpn.en.html#IArithmetics) 
instead of "+" and delete this line.

CDEF:ds4ak=ds4a,UN,0,ds4a,IF
CDEF:ds4bk=ds4b,UN,0,ds4b,IF

Yannick Marquet.



Le 24/02/2013 17:51, Chris Malton a écrit :
> Hi all,
>
> I've been using rrdtool quite successfully for some time. However..... 
> I've now hit a fairly awkward problem, and can't get my head around it.
> https://gist.github.com/cjsoftuk/5024419 is the rrdtool command I'm 
> running (newlines added by me to make it readable!)
>
> The problem is, the "Current" column in the legend is always "0.00 bps".
> If I switch from the CDEFs to the DEF, it's fine, but then I'm missing 
> aggregated data.
>
> I'm sure I'm being stupid here, however, I can't see where I'm getting 
> it wrong.
>
> Could anyone shed some light on the situation?
>
> Thanks in advance.
>
> Regards,
>
> Chris
>
>
> _______________________________________________
> rrd-users mailing list
> rrd-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20130225/51326048/attachment.htm 


More information about the rrd-users mailing list