[rrd-users] Re: Plot a dotted line

Alex van den Bogaerdt alex at ergens.op.het.net
Mon Nov 21 19:01:04 MET 2005

On Mon, Nov 21, 2005 at 06:01:13PM +0100, Simone Morandini wrote:

> Thanks for the suggestion! Now it works, but I had to add a couple of
> workaround: the CDEF that works on my machine is this:
> "CDEF:dotted=TIME,3600,one,*,/,2,%,0.7,GT,$abw,UNKN,IF",
> where $abw is obviously the value I have to display.

> First, I had to define the variable "one" this way:
> "CDEF:one=$ds1,$ds1,/", because "CDEF:dotted=TIME,3600,/" didn't work
> (no graphs displayed at all!).

This is no surprise.  TIME needs a variable.  In your example,
there is no variable on the right hand side of the equal sign.
By introducing "one", you add such a variable.  You could have
done the same using "$abw".

Also be aware that "ds1,ds1,/" is not always 1.  It will fail if
ds1 is zero, infinite or unknown.

Try "CDEF:dotted=$abw,POP,TIME,3600,/" or similar.  This will destroy
the variable itself but "remember" its time component.

> Second, the comaparison (x > 0.7) is used to set the length of the
> segments of the dotted line; otherwise, an almost invisible dot is
> displayed every 2 hours.

It looks as if you do not end up with either 0 or 1.  Quite remarkable
for an integer division by 2.  I think this test is useless.

"TIME,3600,one,*,/,2,%" should result in either 0 or 1.
You then compare this to 0.7 and use "GT" to produce either 0 or 1.
You are transforming 0 into 0, and 1 into 1.

Alex van den Bogaerdt

Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-users
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi

More information about the rrd-users mailing list