X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=examples%2F4charts.pl.in;h=beeb6f4a2e6f218e10c24395aeb603269ff73a33;hb=f9e5bd6a9d41c4607291cbbd88280129184ab325;hp=67dfdad0a3df7270cda7433dc9fb1b4edcad71bb;hpb=a390dded3e87ac8fd340175a7aa8cf7bce4d02f3;p=rrdtool.git diff --git a/examples/4charts.pl.in b/examples/4charts.pl.in index 67dfdad..beeb6f4 100755 --- a/examples/4charts.pl.in +++ b/examples/4charts.pl.in @@ -1,9 +1,8 @@ -#! /usr/sepp/bin/perl +#! @PERL@ #makes things work when run without install -use lib qw( ../bindings/perl-shared/blib/lib ../bindings/perl-shared/blib/arch ); -# this is for after install -use lib qw( @prefix@/lib/perl ../lib/perl ); +use lib qw( @prefix@/lib/perl ); + use RRDs; my $start=time; @@ -31,10 +30,11 @@ for ($t=$start; $t<$start+300*300; $t+=300){ } } -$c1="f57912a0"; -$c2="2a79e9a0"; -$w=300; -$h=140; +my $c1="f57912a0"; +my $c2="2a79e9a0"; +my $w=300; +my $h=140; + RRDs::graph "$name-L.png", "--title", "2 LINES", "--start", "now", @@ -115,12 +115,9 @@ RRDs::graph "$name-sample.png", "LINE1:b#ff0000:Max Incoming", ; - - -print "ERROR: $ERROR\n" if $ERROR = RRDs::error; - - - +if ($ERROR = RRDs::error) { + print "ERROR: $ERROR\n"; +}; print "This script has created $name.png in the current directory\n"; print "This demonstrates the use of the TIME and % RPN operators\n";