X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=examples%2Fstripes.pl.in;h=362f4992e02743559107dda00b912721c6e982bc;hp=c19695a0c42d289275fa593b546e2f03f85383c7;hb=ca8d9c109d76e8c024f21edd10474e0e5d29b892;hpb=a1fe8fd19bb4f558150e52c0624869667b739877 diff --git a/examples/stripes.pl.in b/examples/stripes.pl.in index c19695a..362f499 100755 --- a/examples/stripes.pl.in +++ b/examples/stripes.pl.in @@ -1,17 +1,12 @@ #! @PERL@ - -#makes things work when run without install -use lib qw( ../bindings/perl-shared/blib/lib ../bindings/perl-shared/blib/arch ); - -#makes programm work AFTER install -use lib qw( @prefix@/lib/perl ../lib/perl ); +use lib qw( @prefix@/lib/perl ); use strict; use vars qw(@ISA $loaded); use RRDs; my $start=time; -my $rrd="randome.rrd"; +my $rrd="random.rrd"; RRDs::create ($rrd, "--start",$start-1, "--step",300, "DS:a:GAUGE:600:U:U", "DS:b:GAUGE:600:U:U", @@ -26,7 +21,7 @@ for ($t=$start; $t<$start+200*300; $t+=300){ } } RRDs::graph "stripes.png", - "--title", 'Stripes Demo', + "--title", "Stripes Demo", "--start", $start, "--end", "start + 400 min", "--interlace", @@ -40,10 +35,10 @@ RRDs::graph "stripes.png", "AREA:beta#00b674:beta", "LINE1:b#ff4400:beta envelope\\c", "COMMENT:\\s", - "COMMENT:CDEF\:alpha=TIME,1200,%,600,LT,a,UNKN,IF", - "COMMENT:CDEF\:beta=TIME,1200,%,600,GE,b,UNKN,IF\\j"; + "COMMENT:alpha=TIME,1200,%,600,LT,a,UNKN,IF", + "COMMENT:beta=TIME,1200,%,600,GE,b,UNKN,IF\\j"; if ($ERROR = RRDs::error) { - print "ERROR: $ERROR\n"; + die "ERROR: $ERROR\n"; };