[rrd-users] Re: how to use RRDs::graph in a perlscript?
Christian_Lair at i2.com
Christian_Lair at i2.com
Wed May 19 16:14:47 MEST 2004
Here's an example from one of my scripts that works just fine. If you
include your code we may be able to help you in detail.
my $start_90 = ($today - 77760000);
RRDs::graph "$graph_location/$host/90day.gif",
"--start", "$start_90",
"--title", "90 Day Graph",
"--w","375", "--h", "200",
"--x", "WEEK:1:MONTH:1:MONTH:1:0:%b",
"DEF:LoadAvg=$rrd_location/$host/$host.rrd:load:AVERAGE",
"LINE2:LoadAvg#FF0000:Load Average",
"DEF:CPU_Load=$rrd_location/$host/$host.rrd:cpu:AVERAGE",
"LINE2:CPU_Load#00FF00:CPU Load",
"DEF:Vmem_Load=$rrd_location/$host/$host.rrd:vm:AVERAGE",
"LINE2:Vmem_Load#0000FF:VM Load",;
my $ERR=RRDs::error;
die "ERROR while creating 90 day graph: $ERR\n" if $ERR;
=
"Arne G?tje ($B9b at 92Z(B)" <arne at linux.org.tw>
Sent by: rrd-users-bounce at list.ee.ethz.ch
05/19/2004 03:33 AM
To
rrd-users at list.ee.ethz.ch
cc
Subject
[rrd-users] how to use RRDs::graph in a perlscript?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi list.
when I try to use RRDs::graph in a perlscript I get the error message:
can't parse '"-a", "PNG",
"DEF:myin1=/usr/local/lib/pcube/140.112.225/140.112.225.70.rrd:in1:AVERAGE",
"AREA:myin1#FF0000",
"DEF:myin2=/usr/local/lib/pcube/140.112.225/140.112.225.70.rrd:in2:AVERAGE",
"STACK:myin2#00FF00",
"DEF:myin3=/usr/local/lib/pcube/140.112.225/140.112.225.70.rrd:in3:AVERAGE",
"STACK:myin3#0000FF",
"DEF:myin4=/usr/local/lib/pcube/140.112.225/140.112.225.70.rrd:in4:AVERAGE",
"STACK:myin4#FFFF00",
"DEF:myin5=/usr/local/lib/pcube/140.112.225/140.112.225.70.rrd:in5:AVERAGE",
"STACK:myin5#FF00FF",
"DEF:myin6=/usr/local/lib/pcube/140.112.225/140.112.225.70.rrd:in6:AVERAGE",
"STACK:myin6#00FFFF",
"DEF:myin7=/usr/local/lib/pcube/140.112.225/140.112.225.70.rrd:in7:AVERAGE",
"STACK:myin7#FFC0C0",
"DEF:myin8=/usr/local/lib/pcube/140.112.225/140.112.225.70.rrd:in8:AVERAGE",
"STACK:myin8#C0C0C0",
"DEF:myin9=/usr/local/lib/pcube/140.112.225/140.112.225.70.rrd:in9:AVERAGE",
"STACK:myin9#C0FFC0",
"DEF:myin10=/usr/local/lib/pcube/140.112.225/140.112.225.70.rrd:in10:AVERAGE",
"STACK:myin10#C0C0FF",
"DEF:myin11=/usr/local/lib/pcube/140.112.225/140.112.225.70.rrd:in11:AVERAGE",
"STACK:myin11#A000A0",
"DEF:myin12=/usr/local/lib/pcube/140.112.225/140.112.225.70.rrd:in12:AVERAGE",
"STACK:myin12#A0A000",
"DEF:myin13=/usr/local/lib/pcube/140.112.225/140.112.225.70.rrd:in13:AVERAGE",
"STACK:myin13#00A0A0",
"DEF:myin14=/usr/local/lib/pcube/140.112.225/140.112.225.70.rrd:in14:AVERAGE",
"STACK:myin14#0000A0",
"DEF:myin15=/usr/local/lib/pcube/140.112.225/140.112.225.70.rrd:in15:AVERAGE",
"STACK:myin15#A00000",
"DEF:myin16=/usr/local/lib/pcube/140.112.225/140.112.225.70.rrd:in16:AVERAGE",
"STACK:myin16#00A000",
"DEF:myin17=/usr/local/lib/pcube/140.112.225/140.112.225.70.rrd:in17:AVERAGE",
"STACK:myin17FFA000",
"DEF:myin18=/usr/local/lib/pcube/140.112.225/140.112.225.70.rrd:in18:AVERAGE",
"STACK:myin18#A0FFFF",
"DEF:myin19=/usr/local/lib/pcube/140.112.225/140.112.225.70.rrd:in19:AVERAGE",
"STACK:myin19#131313",
"DEF:myin20=/usr/local/lib/pcube/140.112.225/140.112.225.70.rrd:in20:AVERAGE",
"STACK:myin20#BC0013"'
How to use it? A proper documentation wwith examples would be helpful.
Thanks.
Arne
- --
Arne G?tje ($B9b at 92Z(B) <arne at linux.org.tw>
PGP/GnuPG key: 1024D/685D1E8C
Fingerprint: 2056 F6B7 DEA8 B478 311F 1C34 6E9F D06E 685D 1E8C
Key available at wwwkeys.pgp.net. Encrypted e-mail preferred.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
iD8DBQFAqxvubp/QbmhdHowRAv/VAJ9D55NkdZ/D21dR7MsSDMbdjzV+PACgst5l
jhi8DX/m9gNhM4FP82m5Pi4=
=4aoj
-----END PGP SIGNATURE-----
--
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
--
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