[rrd-users] Re: How best to load up RRDs::graph
Joe Loiacono
jloiacon at csc.com
Mon Jun 12 15:09:39 MEST 2006
Doh! ... left off the graph filename ...
Joe Loiacono/CIV/CSC at CSC
Sent by: rrd-users-bounce at list.ee.ethz.ch
06/09/2006 05:00 PM
To
rrd-users at list.ee.ethz.ch
cc
Subject
[rrd-users] How best to load up RRDs::graph
I have stared at this a long time, but can't see the problem. The issue
has come about because I'm fiddling with the way Perl provides the
parameters to RRDs::graph, trying to be able to include/exclude certain
parameters when necessary. The same thing works using the old way (see
below - the Perl is at the bottom.)
TIA, Joe
I print out what I have and try the command line (the rrd file and DS are
valid):
rrdtool graph --title Last24Hours --start 1149797278 --end 1149883678
--width 600 --height 150 --slope-mode
DEF:flowbits=/htp/cgi-bin/FlowViewer_3.0/FlowTracker_RRDTool/science_data.rrd:flowbits:AVERAGE
VDEF:flowbitsmax=flowbits,MAXIMUM VDEF:flowbitsavg=flowbits,AVERAGE
VDEF:flowbitsmin=flowbits,MINIMUM VDEF:flowbitspct=flowbits,95,PERCENT
AREA:flowbits#FFE0C0 LINE:0.3:flowbits#000000
ERROR: Not a valid vname: flowbits in line
VDEF:flowbitsmax=flowbits,MAXIMUM
New Perl (trying two methods):
@graph_parameters =
('--title',"$rrd_title",
'--start',$start_rrd,
'--end',$end_rrd,
'--width',$rrd_width,
'--height',$rrd_height,$slope_mode,
"DEF:flowbits=$rrdtool_file:flowbits:AVERAGE",
'VDEF:flowbitsmax=flowbits,MAXIMUM',
'VDEF:flowbitsavg=flowbits,AVERAGE',
'VDEF:flowbitsmin=flowbits,MINIMUM',
'VDEF:flowbitspct=flowbits,95,PERCENT',
"AREA:flowbits#$rrd_area",
"LINE:$rrd_thick:flowbits#$rrd_line" );
print "@graph_parameters\n\n";
$rrdgraph_command = "rrdtool graph " . "@graph_parameters";
print "\n$rrdgraph_command\n";
system($rrdgraph_command);
RRDs::graph $graph_file, @graph_paramters;
Old Perl (works, but with limited flexibility, can't use empty variables)
RRDs::graph "$graph_file",
"--title=$rrd_title",
"--start=$start_rrd",
"--end=$end_rrd",
"--slope-mode",
"--width=$rrd_width",
"--height=$rrd_height",
"DEF:flowbits=$rrdtool_file:flowbits:AVERAGE",
"VDEF:flowbitsmax=flowbits,MAXIMUM",
"VDEF:flowbitsavg=flowbits,AVERAGE",
"VDEF:flowbitsmin=flowbits,MINIMUM",
"VDEF:flowbitspct=flowbits,95,PERCENT",
"AREA:flowbits#$rrd_area:",
"LINE$rrd_thick:flowbits#$rrd_line:";
--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive http://lists.ee.ethz.ch/rrd-users
WebAdmin http://lists.ee.ethz.ch/lsg2.cgi
--
Unsubscribe mailto:rrd-users-request at list.ee.ethz.ch?subject=unsubscribe
Help mailto:rrd-users-request at list.ee.ethz.ch?subject=help
Archive http://lists.ee.ethz.ch/rrd-users
WebAdmin http://lists.ee.ethz.ch/lsg2.cgi
More information about the rrd-users
mailing list