[rrd-users] Parameter problem - was: LAST always returning zero
Wes
wespvp at msg.bt.com
Sat Mar 8 23:57:49 CET 2008
On 3/8/08 2:08 AM, "Alex van den Bogaerdt" <alex at ergens.op.het.net> wrote:
> CDEF:red1=queue1,UN,INF,UNKN,IF
> AREA:red1#FF0000:unknown
> CDEF:red2=queue2,UN,-INF,UNKN,IF
> AREA:red2#FF0000:unknown
>
> This won't solve your problem but it should make it more visible.
>
> Another debug technique:
>
> If your script has a variable '$end' or so, change
> -t "Disabled Queues (mmp11es)"
> into
> -t "Disabled Queues (mmp11es) upto $end"
>
> You could combine this with
> VDEF:last=queue1,LAST
> GPRINT:last:"%s":strftime
I did the above. To verify functionality (force an undefined value), I set
--end <rrdtool last> / 10 * 10 + 20
The graph label ($end) shows *250 and the GPRINT LAST shoes *230, there is a
red bar in the graph, and the GPRINT enabled/disabled is showing 0, all
exactly as expected.
I change it to:
--end <rrdtool last> / 10 * 10
Both the graph label and the GPRINT LAST show *340. There is *no* red bar
in the graph. The queue GPRINT enabled/disabled is showing 0, when it
should be showing 1. I assume this is because when --end is 340, I actually
get through 350, per my previous email. But then why don't I have a red
bar?
I change it to:
--end <rrdtool last> / 10 * 10 - 2
The graph label shows *448 and the GPRINT LAST shows *450. There is no red
bar, the GPRINT enabled/disabled is showing the correct value of 1.
It appears to be working correctly with the "-2". However, yesterday it was
randomly flipping back and forth between 1 and 0. I had even tried "-20" to
force it to go back multiple samples and it was flipping back and forth. I
had some print statements in the script to verify $end was getting the -20.
I don't know why the difference between last night and today. If it were a
timing issue, the "-20" should have cured it. I'll leave it running with
the debug code in, and the "-2", and see if I can catch it failing again.
Wes
More information about the rrd-users
mailing list