[rrd-users] Strange behavior of rrdgraph with data summarization from multiple RRDs by CDEF
Stanislav Datskevich
sdatskevich at gmail.com
Tue Nov 5 16:34:13 CET 2013
Hello, list!
I've found a strange behavior of rrdgraph when I trying to summarize
traffic data from multiple RRDs. I use this CDEF expression to summarize
traffic:
CDEF:sum_in=in1,UN,0,in1,IF,in3,UN,0,in3,IF,+,in4,UN,0,in4,IF,+,<others>,8,*
CDEF:sum_out=out1,UN,0,out1,IF,out3,UN,0,out3,IF,+,out4,UN,0,out4,IF,+,<others>,8,*
Point is to check every variable to 'unknown' value and replace it with 0,
then sum with previous values, and at last multiple sum by 8 to get bits
instead of bytes.
Result is very strange: http://noc.nek0.net/configs/graph_good.png shows
graph on even minutes (i.e. 14:16 ),
http://noc.nek0.net/configs/graph_bad.png shows graph on odd minutes
(14:17). Look at the graph legend: it shows now is 0.00 bps traffic.
Workaround is to not check first variable in CDEF for unknown, like this:
CDEF:sum_in=in1,in3,UN,0,in3,IF,+,in4,UN,0,in4,IF,+,<others>,8,*
CDEF:sum_out=out1,out3,UN,0,out3,IF,+,out4,UN,0,out4,IF,+,<others>,8,*
With this formula, it will show last value correct regardless of current
minute.
RRDs updates every minute, at first 2-3 seconds of the minute.
Can somebody explain this please?
I will appreciate any help.
My whole rrdgraph expression also is in attach.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/rrd-users/attachments/20131105/fd6c1a33/attachment.htm
-------------- next part --------------
rrdtool graph /tmp/1.png --slope-mode \
--title \
'summary' \
--lazy \
--start \
-24h \
--end \
-1min \
--width \
750 \
--height \
200 \
--imgformat \
PNG \
--lower \
0 \
--watermark \
'generated by Giganet IXP' \
DEF:in1=/srv/rrd/1.rrd:ds0:MAX \
DEF:out1=/srv/rrd/1.rrd:ds1:MAX \
DEF:in3=/srv/rrd/3.rrd:ds0:MAX \
DEF:out3=/srv/rrd/3.rrd:ds1:MAX \
DEF:in4=/srv/rrd/4.rrd:ds0:MAX \
DEF:out4=/srv/rrd/4.rrd:ds1:MAX \
DEF:in5=/srv/rrd/5.rrd:ds0:MAX \
DEF:out5=/srv/rrd/5.rrd:ds1:MAX \
DEF:in6=/srv/rrd/6.rrd:ds0:MAX \
DEF:out6=/srv/rrd/6.rrd:ds1:MAX \
DEF:in7=/srv/rrd/7.rrd:ds0:MAX \
DEF:out7=/srv/rrd/7.rrd:ds1:MAX \
DEF:in8=/srv/rrd/8.rrd:ds0:MAX \
DEF:out8=/srv/rrd/8.rrd:ds1:MAX \
DEF:in9=/srv/rrd/9.rrd:ds0:MAX \
DEF:out9=/srv/rrd/9.rrd:ds1:MAX \
DEF:in10=/srv/rrd/10.rrd:ds0:MAX \
DEF:out10=/srv/rrd/10.rrd:ds1:MAX \
DEF:in11=/srv/rrd/11.rrd:ds0:MAX \
DEF:out11=/srv/rrd/11.rrd:ds1:MAX \
DEF:in12=/srv/rrd/12.rrd:ds0:MAX \
DEF:out12=/srv/rrd/12.rrd:ds1:MAX \
DEF:in13=/srv/rrd/13.rrd:ds0:MAX \
DEF:out13=/srv/rrd/13.rrd:ds1:MAX \
DEF:in14=/srv/rrd/14.rrd:ds0:MAX \
DEF:out14=/srv/rrd/14.rrd:ds1:MAX \
DEF:in15=/srv/rrd/15.rrd:ds0:MAX \
DEF:out15=/srv/rrd/15.rrd:ds1:MAX \
DEF:in16=/srv/rrd/16.rrd:ds0:MAX \
DEF:out16=/srv/rrd/16.rrd:ds1:MAX \
DEF:in17=/srv/rrd/17.rrd:ds0:MAX \
DEF:out17=/srv/rrd/17.rrd:ds1:MAX \
DEF:in18=/srv/rrd/18.rrd:ds0:MAX \
DEF:out18=/srv/rrd/18.rrd:ds1:MAX \
DEF:in19=/srv/rrd/19.rrd:ds0:MAX \
DEF:out19=/srv/rrd/19.rrd:ds1:MAX \
DEF:in20=/srv/rrd/20.rrd:ds0:MAX \
DEF:out20=/srv/rrd/20.rrd:ds1:MAX \
DEF:in21=/srv/rrd/21.rrd:ds0:MAX \
DEF:out21=/srv/rrd/21.rrd:ds1:MAX \
DEF:in22=/srv/rrd/22.rrd:ds0:MAX \
DEF:out22=/srv/rrd/22.rrd:ds1:MAX \
DEF:in23=/srv/rrd/23.rrd:ds0:MAX \
DEF:out23=/srv/rrd/23.rrd:ds1:MAX \
DEF:in24=/srv/rrd/24.rrd:ds0:MAX \
DEF:out24=/srv/rrd/24.rrd:ds1:MAX \
DEF:in25=/srv/rrd/25.rrd:ds0:MAX \
DEF:out25=/srv/rrd/25.rrd:ds1:MAX \
DEF:in26=/srv/rrd/26.rrd:ds0:MAX \
DEF:out26=/srv/rrd/26.rrd:ds1:MAX \
DEF:in27=/srv/rrd/27.rrd:ds0:MAX \
DEF:out27=/srv/rrd/27.rrd:ds1:MAX \
DEF:in28=/srv/rrd/28.rrd:ds0:MAX \
DEF:out28=/srv/rrd/28.rrd:ds1:MAX \
DEF:in29=/srv/rrd/29.rrd:ds0:MAX \
DEF:out29=/srv/rrd/29.rrd:ds1:MAX \
DEF:in30=/srv/rrd/30.rrd:ds0:MAX \
DEF:out30=/srv/rrd/30.rrd:ds1:MAX \
DEF:in31=/srv/rrd/31.rrd:ds0:MAX \
DEF:out31=/srv/rrd/31.rrd:ds1:MAX \
DEF:in32=/srv/rrd/32.rrd:ds0:MAX \
DEF:out32=/srv/rrd/32.rrd:ds1:MAX \
DEF:in33=/srv/rrd/33.rrd:ds0:MAX \
DEF:out33=/srv/rrd/33.rrd:ds1:MAX \
DEF:in34=/srv/rrd/34.rrd:ds0:MAX \
DEF:out34=/srv/rrd/34.rrd:ds1:MAX \
DEF:in35=/srv/rrd/35.rrd:ds0:MAX \
DEF:out35=/srv/rrd/35.rrd:ds1:MAX \
DEF:in36=/srv/rrd/36.rrd:ds0:MAX \
DEF:out36=/srv/rrd/36.rrd:ds1:MAX \
DEF:in37=/srv/rrd/37.rrd:ds0:MAX \
DEF:out37=/srv/rrd/37.rrd:ds1:MAX \
DEF:in38=/srv/rrd/38.rrd:ds0:MAX \
DEF:out38=/srv/rrd/38.rrd:ds1:MAX \
DEF:in39=/srv/rrd/39.rrd:ds0:MAX \
DEF:out39=/srv/rrd/39.rrd:ds1:MAX \
DEF:in40=/srv/rrd/40.rrd:ds0:MAX \
DEF:out40=/srv/rrd/40.rrd:ds1:MAX \
DEF:in41=/srv/rrd/41.rrd:ds0:MAX \
DEF:out41=/srv/rrd/41.rrd:ds1:MAX \
DEF:in42=/srv/rrd/42.rrd:ds0:MAX \
DEF:out42=/srv/rrd/42.rrd:ds1:MAX \
DEF:in43=/srv/rrd/43.rrd:ds0:MAX \
DEF:out43=/srv/rrd/43.rrd:ds1:MAX \
DEF:in44=/srv/rrd/44.rrd:ds0:MAX \
DEF:out44=/srv/rrd/44.rrd:ds1:MAX \
DEF:in45=/srv/rrd/45.rrd:ds0:MAX \
DEF:out45=/srv/rrd/45.rrd:ds1:MAX \
DEF:in46=/srv/rrd/46.rrd:ds0:MAX \
DEF:out46=/srv/rrd/46.rrd:ds1:MAX \
DEF:in47=/srv/rrd/47.rrd:ds0:MAX \
DEF:out47=/srv/rrd/47.rrd:ds1:MAX \
DEF:in48=/srv/rrd/48.rrd:ds0:MAX \
DEF:out48=/srv/rrd/48.rrd:ds1:MAX \
DEF:in49=/srv/rrd/49.rrd:ds0:MAX \
DEF:out49=/srv/rrd/49.rrd:ds1:MAX \
DEF:in50=/srv/rrd/50.rrd:ds0:MAX \
DEF:out50=/srv/rrd/50.rrd:ds1:MAX \
DEF:in51=/srv/rrd/51.rrd:ds0:MAX \
DEF:out51=/srv/rrd/51.rrd:ds1:MAX \
DEF:in52=/srv/rrd/52.rrd:ds0:MAX \
DEF:out52=/srv/rrd/52.rrd:ds1:MAX \
DEF:in53=/srv/rrd/53.rrd:ds0:MAX \
DEF:out53=/srv/rrd/53.rrd:ds1:MAX \
DEF:in54=/srv/rrd/54.rrd:ds0:MAX \
DEF:out54=/srv/rrd/54.rrd:ds1:MAX \
DEF:in55=/srv/rrd/55.rrd:ds0:MAX \
DEF:out55=/srv/rrd/55.rrd:ds1:MAX \
DEF:in56=/srv/rrd/56.rrd:ds0:MAX \
DEF:out56=/srv/rrd/56.rrd:ds1:MAX \
DEF:in57=/srv/rrd/57.rrd:ds0:MAX \
DEF:out57=/srv/rrd/57.rrd:ds1:MAX \
DEF:in58=/srv/rrd/58.rrd:ds0:MAX \
DEF:out58=/srv/rrd/58.rrd:ds1:MAX \
DEF:in59=/srv/rrd/59.rrd:ds0:MAX \
DEF:out59=/srv/rrd/59.rrd:ds1:MAX \
DEF:in61=/srv/rrd/61.rrd:ds0:MAX \
DEF:out61=/srv/rrd/61.rrd:ds1:MAX \
DEF:in62=/srv/rrd/62.rrd:ds0:MAX \
DEF:out62=/srv/rrd/62.rrd:ds1:MAX \
DEF:in63=/srv/rrd/63.rrd:ds0:MAX \
DEF:out63=/srv/rrd/63.rrd:ds1:MAX \
DEF:in64=/srv/rrd/64.rrd:ds0:MAX \
DEF:out64=/srv/rrd/64.rrd:ds1:MAX \
DEF:in65=/srv/rrd/65.rrd:ds0:MAX \
DEF:out65=/srv/rrd/65.rrd:ds1:MAX \
DEF:in69=/srv/rrd/69.rrd:ds0:MAX \
DEF:out69=/srv/rrd/69.rrd:ds1:MAX \
DEF:in70=/srv/rrd/70.rrd:ds0:MAX \
DEF:out70=/srv/rrd/70.rrd:ds1:MAX \
DEF:in71=/srv/rrd/71.rrd:ds0:MAX \
DEF:out71=/srv/rrd/71.rrd:ds1:MAX \
DEF:in72=/srv/rrd/72.rrd:ds0:MAX \
DEF:out72=/srv/rrd/72.rrd:ds1:MAX \
DEF:in73=/srv/rrd/73.rrd:ds0:MAX \
DEF:out73=/srv/rrd/73.rrd:ds1:MAX \
DEF:in74=/srv/rrd/74.rrd:ds0:MAX \
DEF:out74=/srv/rrd/74.rrd:ds1:MAX \
DEF:in75=/srv/rrd/75.rrd:ds0:MAX \
DEF:out75=/srv/rrd/75.rrd:ds1:MAX \
DEF:in76=/srv/rrd/76.rrd:ds0:MAX \
DEF:out76=/srv/rrd/76.rrd:ds1:MAX \
DEF:in77=/srv/rrd/77.rrd:ds0:MAX \
DEF:out77=/srv/rrd/77.rrd:ds1:MAX \
DEF:in78=/srv/rrd/78.rrd:ds0:MAX \
DEF:out78=/srv/rrd/78.rrd:ds1:MAX \
DEF:in79=/srv/rrd/79.rrd:ds0:MAX \
DEF:out79=/srv/rrd/79.rrd:ds1:MAX \
DEF:in80=/srv/rrd/80.rrd:ds0:MAX \
DEF:out80=/srv/rrd/80.rrd:ds1:MAX \
DEF:in81=/srv/rrd/81.rrd:ds0:MAX \
DEF:out81=/srv/rrd/81.rrd:ds1:MAX \
DEF:in82=/srv/rrd/82.rrd:ds0:MAX \
DEF:out82=/srv/rrd/82.rrd:ds1:MAX \
DEF:in83=/srv/rrd/83.rrd:ds0:MAX \
DEF:out83=/srv/rrd/83.rrd:ds1:MAX \
DEF:in84=/srv/rrd/84.rrd:ds0:MAX \
DEF:out84=/srv/rrd/84.rrd:ds1:MAX \
DEF:in85=/srv/rrd/85.rrd:ds0:MAX \
DEF:out85=/srv/rrd/85.rrd:ds1:MAX \
DEF:in86=/srv/rrd/86.rrd:ds0:MAX \
DEF:out86=/srv/rrd/86.rrd:ds1:MAX \
DEF:in87=/srv/rrd/87.rrd:ds0:MAX \
DEF:out87=/srv/rrd/87.rrd:ds1:MAX \
DEF:in88=/srv/rrd/88.rrd:ds0:MAX \
DEF:out88=/srv/rrd/88.rrd:ds1:MAX \
DEF:in89=/srv/rrd/89.rrd:ds0:MAX \
DEF:out89=/srv/rrd/89.rrd:ds1:MAX \
DEF:in90=/srv/rrd/90.rrd:ds0:MAX \
DEF:out90=/srv/rrd/90.rrd:ds1:MAX \
DEF:in91=/srv/rrd/91.rrd:ds0:MAX \
DEF:out91=/srv/rrd/91.rrd:ds1:MAX \
DEF:in92=/srv/rrd/92.rrd:ds0:MAX \
DEF:out92=/srv/rrd/92.rrd:ds1:MAX \
DEF:in93=/srv/rrd/93.rrd:ds0:MAX \
DEF:out93=/srv/rrd/93.rrd:ds1:MAX \
DEF:in94=/srv/rrd/94.rrd:ds0:MAX \
DEF:out94=/srv/rrd/94.rrd:ds1:MAX \
DEF:in95=/srv/rrd/95.rrd:ds0:MAX \
DEF:out95=/srv/rrd/95.rrd:ds1:MAX \
DEF:in96=/srv/rrd/96.rrd:ds0:MAX \
DEF:out96=/srv/rrd/96.rrd:ds1:MAX \
CDEF:sum_in=in1,UN,0,in1,IF,in3,UN,0,in3,IF,+,in4,UN,0,in4,IF,+,in5,UN,0,in5,IF,+,in6,UN,0,in6,IF,+,in7,UN,0,in7,IF,+,in8,UN,0,in8,IF,+,in9,UN,0,in9,IF,+,in10,UN,0,in10,IF,+,in11,UN,0,in11,IF,+,in12,UN,0,in12,IF,+,in13,UN,0,in13,IF,+,in14,UN,0,in14,IF,+,in15,UN,0,in15,IF,+,in16,UN,0,in16,IF,+,in17,UN,0,in17,IF,+,in18,UN,0,in18,IF,+,in19,UN,0,in19,IF,+,in20,UN,0,in20,IF,+,in21,UN,0,in21,IF,+,in22,UN,0,in22,IF,+,in23,UN,0,in23,IF,+,in24,UN,0,in24,IF,+,in25,UN,0,in25,IF,+,in26,UN,0,in26,IF,+,in27,UN,0,in27,IF,+,in28,UN,0,in28,IF,+,in29,UN,0,in29,IF,+,in30,UN,0,in30,IF,+,in31,UN,0,in31,IF,+,in32,UN,0,in32,IF,+,in33,UN,0,in33,IF,+,in34,UN,0,in34,IF,+,in35,UN,0,in35,IF,+,in36,UN,0,in36,IF,+,in37,UN,0,in37,IF,+,in38,UN,0,in38,IF,+,in39,UN,0,in39,IF,+,in40,UN,0,in40,IF,+,in41,UN,0,in41,IF,+,in42,UN,0,in42,IF,+,in43,UN,0,in43,IF,+,in44,UN,0,in44,IF,+,in45,UN,0,in45,IF,+,in46,UN,0,in46,IF,+,in47,UN,0,in47,IF,+,in48,UN,0,in48,IF,+,in49,UN,0,in49,IF,+,in50,UN,0,in50,IF,+,in51,UN,0,in51,IF,+,in52,UN,0,in52,IF,+,in53,UN,0,in53,IF,+,in54,UN,0,in54,IF,+,in55,UN,0,in55,IF,+,in56,UN,0,in56,IF,+,in57,UN,0,in57,IF,+,in58,UN,0,in58,IF,+,in59,UN,0,in59,IF,+,in61,UN,0,in61,IF,+,in62,UN,0,in62,IF,+,in63,UN,0,in63,IF,+,in64,UN,0,in64,IF,+,in65,UN,0,in65,IF,+,in69,UN,0,in69,IF,+,in70,UN,0,in70,IF,+,in71,UN,0,in71,IF,+,in72,UN,0,in72,IF,+,in73,UN,0,in73,IF,+,in74,UN,0,in74,IF,+,in75,UN,0,in75,IF,+,in76,UN,0,in76,IF,+,in77,UN,0,in77,IF,+,in78,UN,0,in78,IF,+,in79,UN,0,in79,IF,+,in80,UN,0,in80,IF,+,in81,UN,0,in81,IF,+,in82,UN,0,in82,IF,+,in83,UN,0,in83,IF,+,in84,UN,0,in84,IF,+,in85,UN,0,in85,IF,+,in86,UN,0,in86,IF,+,in87,UN,0,in87,IF,+,in88,UN,0,in88,IF,+,in89,UN,0,in89,IF,+,in90,UN,0,in90,IF,+,in91,UN,0,in91,IF,+,in92,UN,0,in92,IF,+,in93,UN,0,in93,IF,+,in94,UN,0,in94,IF,+,in95,UN,0,in95,IF,+,in96,UN,0,in96,IF,+,8,* \
CDEF:sum_out=out1,UN,0,out1,IF,out3,UN,0,out3,IF,+,out4,UN,0,out4,IF,+,out5,UN,0,out5,IF,+,out6,UN,0,out6,IF,+,out7,UN,0,out7,IF,+,out8,UN,0,out8,IF,+,out9,UN,0,out9,IF,+,out10,UN,0,out10,IF,+,out11,UN,0,out11,IF,+,out12,UN,0,out12,IF,+,out13,UN,0,out13,IF,+,out14,UN,0,out14,IF,+,out15,UN,0,out15,IF,+,out16,UN,0,out16,IF,+,out17,UN,0,out17,IF,+,out18,UN,0,out18,IF,+,out19,UN,0,out19,IF,+,out20,UN,0,out20,IF,+,out21,UN,0,out21,IF,+,out22,UN,0,out22,IF,+,out23,UN,0,out23,IF,+,out24,UN,0,out24,IF,+,out25,UN,0,out25,IF,+,out26,UN,0,out26,IF,+,out27,UN,0,out27,IF,+,out28,UN,0,out28,IF,+,out29,UN,0,out29,IF,+,out30,UN,0,out30,IF,+,out31,UN,0,out31,IF,+,out32,UN,0,out32,IF,+,out33,UN,0,out33,IF,+,out34,UN,0,out34,IF,+,out35,UN,0,out35,IF,+,out36,UN,0,out36,IF,+,out37,UN,0,out37,IF,+,out38,UN,0,out38,IF,+,out39,UN,0,out39,IF,+,out40,UN,0,out40,IF,+,out41,UN,0,out41,IF,+,out42,UN,0,out42,IF,+,out43,UN,0,out43,IF,+,out44,UN,0,out44,IF,+,out45,UN,0,out45,IF,+,out46,UN,0,out46,IF,+,out47,UN,0,out47,IF,+,out48,UN,0,out48,IF,+,out49,UN,0,out49,IF,+,out50,UN,0,out50,IF,+,out51,UN,0,out51,IF,+,out52,UN,0,out52,IF,+,out53,UN,0,out53,IF,+,out54,UN,0,out54,IF,+,out55,UN,0,out55,IF,+,out56,UN,0,out56,IF,+,out57,UN,0,out57,IF,+,out58,UN,0,out58,IF,+,out59,UN,0,out59,IF,+,out61,UN,0,out61,IF,+,out62,UN,0,out62,IF,+,out63,UN,0,out63,IF,+,out64,UN,0,out64,IF,+,out65,UN,0,out65,IF,+,out69,UN,0,out69,IF,+,out70,UN,0,out70,IF,+,out71,UN,0,out71,IF,+,out72,UN,0,out72,IF,+,out73,UN,0,out73,IF,+,out74,UN,0,out74,IF,+,out75,UN,0,out75,IF,+,out76,UN,0,out76,IF,+,out77,UN,0,out77,IF,+,out78,UN,0,out78,IF,+,out79,UN,0,out79,IF,+,out80,UN,0,out80,IF,+,out81,UN,0,out81,IF,+,out82,UN,0,out82,IF,+,out83,UN,0,out83,IF,+,out84,UN,0,out84,IF,+,out85,UN,0,out85,IF,+,out86,UN,0,out86,IF,+,out87,UN,0,out87,IF,+,out88,UN,0,out88,IF,+,out89,UN,0,out89,IF,+,out90,UN,0,out90,IF,+,out91,UN,0,out91,IF,+,out92,UN,0,out92,IF,+,out93,UN,0,out93,IF,+,out94,UN,0,out94,IF,+,out95,UN,0,out95,IF,+,out96,UN,0,out96,IF,+,8,* \
AREA:sum_in#f28727:In \
VDEF:sum_in_last=sum_in,LAST \
VDEF:sum_out_last=sum_out,LAST \
GPRINT:sum_in_last:'now\:%6.2lf %Sbps' \
GPRINT:sum_in:MAX:'(max\: %6.2lf %Sbps)\n' \
LINE1:sum_out#474747:Out \
GPRINT:sum_out_last:'now\:%6.2lf %Sbps' \
GPRINT:sum_out:MAX:'(max\: %6.2lf %Sbps)\n' \
More information about the rrd-users
mailing list