[rrd-users] Why aren't COUNT and LSLSLOPE(COUNT), COUNT, *, LSLINT(COUNT), + identical?

"Peter Valdemar Mørch (Lists)" 4ux6as402 at sneakemail.com
Mon Jan 10 14:17:31 CET 2011


Hi,

( I know the subject is pseudo-rpn... ;-) )

I expect that if I have one CDEF that essentially is COUNT and another 
that is a linear approximation of COUNT they should be identical (since 
COUNT is a line).  In this reproduction recipe, I expected "count" and 
"trend" to have the same values, but the generated graph shows that they 
don't.

Why is that? Is it a peculiarity of COUNT or some weirdness of LSL*?

See:

http://www.morch.com/download/rrd_lslquestion/rrd.png

# We don't really need any data, just an rrd file.
# (taken from the first example from rrdcreate)
rrdtool create temperature.rrd --step 300 DS:temp:GAUGE:600:-273:5000 
RRA:AVERAGE:0.5:1:1200 RRA:MIN:0.5:12:2400 RRA:MAX:0.5:12:2400 
RRA:AVERAGE:0.5:12:2400

# Now we make a graph
rrdtool graph rrd.png --width 500 --step 648000 --height 300 --start 
1288566000 --end  1295046000  DEF:temp=temperature.rrd:temp:AVERAGE 
CDEF:count=temp,POP,COUNT VDEF:a=count,LSLSLOPE VDEF:b=count,LSLINT 
CDEF:trend=temp,POP,a,COUNT,*,b,+ LINE1:count#FF0000 LINE1:trend#0000FF 
PRINT:a:%6.2lf PRINT:b:%6.2lf

prints out
581x349
   1.00
   1.00

(so "a" == 1 and "b" == 1). rrdtool xport gives similar results (but 
doesn't allow me to print out "a" and "b")

Graph rrd.png can be seen in the link above:

Peter
-- 
Peter Valdemar Mørch
http://www.morch.com



More information about the rrd-users mailing list