[rrd-users] RRDs::graph: lost points on resulting graph
Alexey Skorikov
bitman at webazilla.com
Wed May 9 11:49:24 CEST 2012
Hello, Steven
Sorry for broken contents in previous messages. I used <raw> tags for code within the web form and inserted plain text into them.
Let me post the code once again.
rrdtool command parameters (which give consistent result):
/usr/local/bin/rrdtool graph test.png \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title='v-2-eu07-s1 - Traffic - Po2' \
--rigid \
--base=1000 \
--height=200 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label='bits per second' \
--slope-mode \
--font TITLE:10: \
--font AXIS:7: \
--font LEGEND:8: \
--font UNIT:7: \
DEF:a="/mnt/rra/510/29375.rrd":traffic_in:AVERAGE \
DEF:b="/mnt/rra/510/29375.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdeff=b,8,* \
CDEF:cdefba=cdefa,cdeff,+ \
LINE1:cdefa#00CF00FF:"Inbound" \
AREA:cdefa#00CF0033:"" \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s" \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:cdeff#005199FF:"Outbound" \
AREA:cdeff#00519933:"" \
GPRINT:cdeff:LAST:" Current\:%8.2lf %s" \
GPRINT:cdeff:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:cdeff:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:cdefba#FFFFFF00:"" \
CDEF:base=cdefa,cdeff,MAX \
VDEF:p95=base,95,PERCENT \
HRULE:p95#FF0000:"95th Percentile" \
GPRINT:p95:"(%3.2lf %Sbit in+out)\l"
RRSs code (which gives wrong result):
RRDs::graph(
$image_file,
'--imgformat' => 'PNG',
'--start' => -86400,
'--end' => -300,
'--title' =>
$hostname . ' - Traffic - ' . $port,
'--rigid',
'--base' => 1000,
'--height' => 200,
'--width' => 500,
'--alt-autoscale-max',
'--lower-limit' => 0,
'--vertical-label' => 'bits per second',
'--slope-mode',
'--font' => 'TITLE:10:',
'--font' => 'AXIS:7:',
'--font' => 'LEGEND:8:',
'--font' => 'UNIT:7:',
'DEF:a=' . $rrd_file . ':traffic_in:AVERAGE',
'DEF:b=' . $rrd_file . ':traffic_out:AVERAGE',
'CDEF:cdefa=a,8,*',
'CDEF:cdeff=b,8,*',
'CDEF:cdefba=cdefa,cdeff,+',
'LINE1:cdefa#00CF00FF:Inbound',
'AREA:cdefa#00CF0033:',
'GPRINT:cdefa:LAST: Current\:%8.2lf %s',
'GPRINT:cdefa:AVERAGE:Average\:%8.2lf %s',
'GPRINT:cdefa:MAX:Maximum\:%8.2lf %s\n',
'LINE1:cdeff#005199FF:Outbound',
'AREA:cdeff#00519933:',
'GPRINT:cdeff:LAST: Current\:%8.2lf %s',
'GPRINT:cdeff:AVERAGE:Average\:%8.2lf %s',
'GPRINT:cdeff:MAX:Maximum\:%8.2lf %s\n',
'LINE1:cdefba#FFFFFF00:',
'CDEF:base=cdefa,cdeff,MAX',
'VDEF:p95=base,95,PERCENT',
'HRULE:p95#FF0000:95th Percentile',
'GPRINT:p95:(%3.2lf %Sbit in+out)\l',
'COMMENT:Last updated\: ' . $str_time . '\n'
);
The structure of the RRD file (built by cacti) used to render both graphs:
filename = "/mnt/rra/510/29372.rrd"
rrd_version = "0003"
step = 300
last_update = 1336553402
header_size = 1192
ds[traffic_in].index = 0
ds[traffic_in].type = "COUNTER"
ds[traffic_in].minimal_heartbeat = 600
ds[traffic_in].min = 0.0000000000e+00
ds[traffic_in].max = 1.0000000000e+09
ds[traffic_in].last_ds = "28226160754265"
ds[traffic_in].value = 2.9010294600e+06
ds[traffic_in].unknown_sec = 0
ds[traffic_out].index = 1
ds[traffic_out].type = "COUNTER"
ds[traffic_out].minimal_heartbeat = 600
ds[traffic_out].min = 0.0000000000e+00
ds[traffic_out].max = 1.0000000000e+09
ds[traffic_out].last_ds = "448288255336615"
ds[traffic_out].value = 1.1948559933e+08
ds[traffic_out].unknown_sec = 0
rra[0].cf = "AVERAGE"
rra[0].rows = 115200
rra[0].cur_row = 46472
rra[0].pdp_per_row = 1
rra[0].xff = 5.0000000000e-01
rra[0].cdp_prep[0].value = NaN
rra[0].cdp_prep[0].unknown_datapoints = 0
rra[0].cdp_prep[1].value = NaN
rra[0].cdp_prep[1].unknown_datapoints = 0
rra[1].cf = "MAX"
rra[1].rows = 115200
rra[1].cur_row = 98948
rra[1].pdp_per_row = 1
rra[1].xff = 5.0000000000e-01
rra[1].cdp_prep[0].value = NaN
rra[1].cdp_prep[0].unknown_datapoints = 0
rra[1].cdp_prep[1].value = NaN
rra[1].cdp_prep[1].unknown_datapoints = 0
On May 9, 2012, at 12:37 PM, Steve Shipway wrote:
> I don't know how you are trying to include these things in your message, but nothing is appearing in the message on the list. I'm not seeing anything for the RRD format, the rrdtool command line, or the Perl code parameters. Make sure you are cutting and pasting as text.
Thank you.
--
Alexey Skorikov | bitman at webazilla.com
More information about the rrd-users
mailing list