[rrd-users] rrd::graph and perl rpoblem
Mauro
mauog at interfree.it
Tue Jan 18 13:15:44 MET 2005
Hi all,
I'm trying to create a graph via perl script using this line:
RRDs::graph ("$rrd_graph_file", "--title", "% CPU Usage $time_interval average",
"--start", "$time_interval",
"-a", "GIF",
"--vertical-label", "%",
"@DEF",
"@LINE"
);
This line creates a gif file but it shows only one variable line in the graph even if @DEF and @LINE have more than one element.
For example:
print "@DEF" shows:
DEF:cpu_usr=/home/mgatt/rrd/CPU_usage_adad11-db.rrd:cpu_usr:AVERAGE DEF:cpu_wio=/home/mgatt/rrd/CPU_usage_adad11-db.rrd:cpu_wio:AVERAGE DEF:cpu_idle=/home/mgatt/rrd/CPU_usage_adad11-db.rrd:cpu_idle:AVERAGE
print "@LINE" shows:
LINE2:cpu_usr#FF0000:%usr LINE2:cpu_wio#0000FF:%wio LINE2:cpu_idle#888888:%idle
but .gif shows only one red line referring to first variable cpu_usr
I create @DEF and @LINE in this way:
push (@DEF, "DEF:cpu_$unit=$rrd:cpu_$unit:AVERAGE ,")
push (@LINE,"LINE2:cpu_$unit$color:%$unit ,")
where $unit changes.
What I'm doing wrong?
Thank You
Mauro
--
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://www.ee.ethz.ch/~slist/rrd-users
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the rrd-users
mailing list