rrdtool-1.x
rrdtool-1.x copied to clipboard
Broken handling of empty final options
With 1.5.3 i a running into problems with empty final options. I receive weird errors on some systems
Not working:
rrdtool graph /tmp/Q6JQzsWi4XIBbrDr.png -g --alt-autoscale --rigid --start 1439117764 --end 1439204164 --width 1159 --height 300 -c BACK#EEEEEE00 -c SHADEA#EEEEEE00 -c SHADEB#EEEEEE00 -c FONT#000000 -c CANVAS#FFFFFF00 -c GRID#a5a5a5 -c MGRID#FF9999 -c FRAME#5e5e5e -c ARROW#5e5e5e -R normal --font LEGEND:8:'DroidSansMono,DejaVuSansMono' --font AXIS:7:'DroidSansMono,DejaVuSansMono' --font-render-mode normal -E '-b 1024' 'DEF:atotalswap=/opt/observium/rrd/hpc-observium/ucd_mem.rrd:totalswap:AVERAGE' 'DEF:aavailswap=/opt/observium/rrd/hpc-observium/ucd_mem.rrd:availswap:AVERAGE' 'DEF:atotalreal=/opt/observium/rrd/hpc-observium/ucd_mem.rrd:totalreal:AVERAGE' 'DEF:aavailreal=/opt/observium/rrd/hpc-observium/ucd_mem.rrd:availreal:AVERAGE' 'DEF:atotalfree=/opt/observium/rrd/hpc-observium/ucd_mem.rrd:totalfree:AVERAGE' 'DEF:ashared=/opt/observium/rrd/hpc-observium/ucd_mem.rrd:shared:AVERAGE' 'DEF:abuffered=/opt/observium/rrd/hpc-observium/ucd_mem.rrd:buffered:AVERAGE' 'DEF:acached=/opt/observium/rrd/hpc-observium/ucd_mem.rrd:cached:AVERAGE' 'CDEF:totalswap=atotalswap,1024,*' 'CDEF:availswap=aavailswap,1024,*' 'CDEF:totalreal=atotalreal,1024,*' 'CDEF:availreal=aavailreal,1024,*' 'CDEF:totalfree=atotalfree,1024,*' 'CDEF:shared=ashared,1024,*' 'CDEF:buffered=abuffered,1024,*' 'CDEF:cached=acached,1024,*' 'CDEF:usedreal=totalreal,availreal,-' 'CDEF:usedswap=totalswap,availswap,-' 'CDEF:trueused=usedreal,cached,-,buffered,-' 'CDEF:true_perc=trueused,totalreal,/,100,*' 'CDEF:swrl_perc=usedswap,totalreal,/,100,*' 'CDEF:swap_perc=usedswap,totalswap,/,100,*' 'CDEF:real_perc=usedreal,totalreal,/,100,*' 'CDEF:real_percf=100,real_perc,-' 'CDEF:shared_perc=shared,totalreal,/,100,*' 'CDEF:buffered_perc=buffered,totalreal,/,100,*' 'CDEF:cached_perc=cached,totalreal,/,100,*' 'CDEF:cusedswap=usedswap,-1,*' 'CDEF:cdeftot=availreal,buffered,usedreal,cached,usedswap,+,+,+,+' 'COMMENT:Memory Current Average Maximum\n' 'LINE1:usedreal#ffaa66:' 'AREA:usedreal#f0e0a0:RAM Used :' 'GPRINT:usedreal:LAST:%6.2lf%sB' 'GPRINT:usedreal:AVERAGE:%6.2lf%sB' 'GPRINT:usedreal:MAX:%6.2lf%sB' 'GPRINT:real_perc:LAST:%3.0lf%%\n' 'AREA:trueused#ffaa66:-Ca,Sh,Bu:' 'GPRINT:trueused:LAST:%6.2lf%sB' 'GPRINT:trueused:AVERAGE:%6.2lf%sB' 'GPRINT:trueused:MAX:%6.2lf%sB' 'GPRINT:true_perc:LAST:%3.0lf%%\n' 'AREA:availreal#e5e5e5:RAM Free :STACK' 'GPRINT:availreal:LAST:%6.2lf%sB' 'GPRINT:availreal:AVERAGE:%6.2lf%sB' 'GPRINT:availreal:MAX:%6.2lf%sB' 'GPRINT:real_percf:LAST:%3.0lf%%\n' 'AREA:cusedswap#C3D9FF:Swap Used' 'LINE1.25:cusedswap#356AA0:' 'GPRINT:usedswap:LAST:%6.2lf%sB' 'GPRINT:usedswap:AVERAGE:%6.2lf%sB' 'GPRINT:usedswap:MAX:%6.2lf%sB' 'GPRINT:swap_perc:LAST:%3.0lf%%\n' 'LINE1.25:usedswap#356AA0:% of RAM ' 'GPRINT:swrl_perc:LAST:%3.0lf%%\n' 'COMMENT: \n' 'AREA:trueused#ffaa66::' 'AREA:buffered#cc0000::STACK' 'AREA:cached#f0e0a0::STACK' 'LINE1:usedreal#d0b080::' 'LINE1.25:trueused#ffaa66::' 'LINE1.25:buffered#cc0000:Buffers :STACK' 'GPRINT:buffered:LAST:%6.2lf%sB' 'GPRINT:buffered:AVERAGE:%6.2lf%sB' 'GPRINT:buffered:MAX:%6.2lf%sB' 'GPRINT:buffered_perc:LAST:%3.0lf%%\n' 'LINE1.25:cached#f0e0a0:Cached :STACK' 'GPRINT:cached:LAST:%6.2lf%sB' 'GPRINT:cached:AVERAGE:%6.2lf%sB' 'GPRINT:cached:MAX:%6.2lf%sB' 'GPRINT:cached_perc:LAST:%3.0lf%%\n' 'LINE1.25:shared#008fea:Shared :' 'GPRINT:shared:LAST:%6.2lf%sB' 'GPRINT:shared:AVERAGE:%6.2lf%sB' 'GPRINT:shared:MAX:%6.2lf%sB' 'GPRINT:shared_perc:LAST:%3.0lf%%\n' 'LINE1:totalreal#050505:' 'LINE1:totalreal#050505:Total ' 'GPRINT:totalreal:AVERAGE: %6.2lf%sB\n' 'LINE1.25:usedswap#356AA0:'
working:
rrdtool graph /tmp/YJjLHgrefp0sXSWy.png -g --alt-autoscale --rigid --start 1439119612 --end 1439206012 --width 1159 --height 300 -c BACK#EEEEEE00 -c SHADEA#EEEEEE00 -c SHADEB#EEEEEE00 -c FONT#000000 -c CANVAS#FFFFFF00 -c GRID#a5a5a5 -c MGRID#FF9999 -c FRAME#5e5e5e -c ARROW#5e5e5e -R normal --font LEGEND:8:'DroidSansMono,DejaVuSansMono' --font AXIS:7:'DroidSansMono,DejaVuSansMono' --font-render-mode normal -E '-b 1024' 'DEF:atotalswap=/opt/observium/rrd/hpc-observium/ucd_mem.rrd:totalswap:AVERAGE' 'DEF:aavailswap=/opt/observium/rrd/hpc-observium/ucd_mem.rrd:availswap:AVERAGE' 'DEF:atotalreal=/opt/observium/rrd/hpc-observium/ucd_mem.rrd:totalreal:AVERAGE' 'DEF:aavailreal=/opt/observium/rrd/hpc-observium/ucd_mem.rrd:availreal:AVERAGE' 'DEF:atotalfree=/opt/observium/rrd/hpc-observium/ucd_mem.rrd:totalfree:AVERAGE' 'DEF:ashared=/opt/observium/rrd/hpc-observium/ucd_mem.rrd:shared:AVERAGE' 'DEF:abuffered=/opt/observium/rrd/hpc-observium/ucd_mem.rrd:buffered:AVERAGE' 'DEF:acached=/opt/observium/rrd/hpc-observium/ucd_mem.rrd:cached:AVERAGE' 'CDEF:totalswap=atotalswap,1024,*' 'CDEF:availswap=aavailswap,1024,*' 'CDEF:totalreal=atotalreal,1024,*' 'CDEF:availreal=aavailreal,1024,*' 'CDEF:totalfree=atotalfree,1024,*' 'CDEF:shared=ashared,1024,*' 'CDEF:buffered=abuffered,1024,*' 'CDEF:cached=acached,1024,*' 'CDEF:usedreal=totalreal,availreal,-' 'CDEF:usedswap=totalswap,availswap,-' 'CDEF:trueused=usedreal,cached,-,buffered,-' 'CDEF:true_perc=trueused,totalreal,/,100,*' 'CDEF:swrl_perc=usedswap,totalreal,/,100,*' 'CDEF:swap_perc=usedswap,totalswap,/,100,*' 'CDEF:real_perc=usedreal,totalreal,/,100,*' 'CDEF:real_percf=100,real_perc,-' 'CDEF:shared_perc=shared,totalreal,/,100,*' 'CDEF:buffered_perc=buffered,totalreal,/,100,*' 'CDEF:cached_perc=cached,totalreal,/,100,*' 'CDEF:cusedswap=usedswap,-1,*' 'CDEF:cdeftot=availreal,buffered,usedreal,cached,usedswap,+,+,+,+' 'COMMENT:Memory Current Average Maximum\n' 'LINE1:usedreal#ffaa66:' 'AREA:usedreal#f0e0a0:RAM Used ' 'GPRINT:usedreal:LAST:%6.2lf%sB' 'GPRINT:usedreal:AVERAGE:%6.2lf%sB' 'GPRINT:usedreal:MAX:%6.2lf%sB' 'GPRINT:real_perc:LAST:%3.0lf%%\n' 'AREA:trueused#ffaa66:-Ca,Sh,Bu' 'GPRINT:trueused:LAST:%6.2lf%sB' 'GPRINT:trueused:AVERAGE:%6.2lf%sB' 'GPRINT:trueused:MAX:%6.2lf%sB' 'GPRINT:true_perc:LAST:%3.0lf%%\n' 'AREA:availreal#e5e5e5:RAM Free :STACK' 'GPRINT:availreal:LAST:%6.2lf%sB' 'GPRINT:availreal:AVERAGE:%6.2lf%sB' 'GPRINT:availreal:MAX:%6.2lf%sB' 'GPRINT:real_percf:LAST:%3.0lf%%\n' 'AREA:cusedswap#C3D9FF:Swap Used' 'LINE1.25:cusedswap#356AA0:' 'GPRINT:usedswap:LAST:%6.2lf%sB' 'GPRINT:usedswap:AVERAGE:%6.2lf%sB' 'GPRINT:usedswap:MAX:%6.2lf%sB' 'GPRINT:swap_perc:LAST:%3.0lf%%\n' 'LINE1.25:usedswap#356AA0:% of RAM ' 'GPRINT:swrl_perc:LAST:%3.0lf%%\n' 'COMMENT: \n' 'AREA:trueused#ffaa66:' 'AREA:buffered#cc0000::STACK' 'AREA:cached#f0e0a0::STACK' 'LINE1:usedreal#d0b080:' 'LINE1.25:trueused#ffaa66:' 'LINE1.25:buffered#cc0000:Buffers :STACK' 'GPRINT:buffered:LAST:%6.2lf%sB' 'GPRINT:buffered:AVERAGE:%6.2lf%sB' 'GPRINT:buffered:MAX:%6.2lf%sB' 'GPRINT:buffered_perc:LAST:%3.0lf%%\n' 'LINE1.25:cached#f0e0a0:Cached :STACK' 'GPRINT:cached:LAST:%6.2lf%sB' 'GPRINT:cached:AVERAGE:%6.2lf%sB' 'GPRINT:cached:MAX:%6.2lf%sB' 'GPRINT:cached_perc:LAST:%3.0lf%%\n' 'LINE1.25:shared#008fea:Shared ' 'GPRINT:shared:LAST:%6.2lf%sB' 'GPRINT:shared:AVERAGE:%6.2lf%sB' 'GPRINT:shared:MAX:%6.2lf%sB' 'GPRINT:shared_perc:LAST:%3.0lf%%\n' 'LINE1:totalreal#050505:' 'LINE1:totalreal#050505:Total ' 'GPRINT:totalreal:AVERAGE: %6.2lf%sB\n' 'LINE1.25:usedswap#356AA0:'
Only difference in parts like this:
'LINE1:usedreal#ffaa66:' 'AREA:usedreal#f0e0a0:RAM Used :'
vs
'LINE1:usedreal#ffaa66:' 'AREA:usedreal#f0e0a0:RAM Used
The error message was:
Unused Arguments "" in command : AREA:usedreal#f0e0a0:RAM Used :```
I think it is not just in version 1.5,3 but 1.5.5 too.
and what would you like to happen when you use an empty argument ? could it be that you meant to write:
AREA:usedreal#f0e0a0:RAM Used \: