summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0fd5db8)
raw | patch | inline | side by side (parent: 0fd5db8)
author | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 18 May 2004 18:49:50 +0000 (18:49 +0000) | ||
committer | oetiker <oetiker@a5681a0c-68f1-0310-ab6d-d61299d08faa> | |
Tue, 18 May 2004 18:49:50 +0000 (18:49 +0000) |
diff --git a/program/configure.ac b/program/configure.ac
index 1ce43a2995feb2f1a1d779c5d8834ad3465a3898..902780267165b3be8096f04e80ba4f5354430498 100644 (file)
--- a/program/configure.ac
+++ b/program/configure.ac
examples/bigtops.pl \
examples/minmax.pl \
examples/cgi-demo.cgi \
+ examples/4charts.pl \
examples/Makefile \
doc/Makefile \
src/Makefile \
index 9df0f7b1b826700bda17c7ae34a051db439e3076..7249b07aac48a2d7d8f579d82870c00b1ea2ef3f 100755 (executable)
-#! /usr/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 RRDs;
my $start=time;
}
}
-$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",
"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";
index 483e23219b69313025cd8536b9736568d3046bf6..258173b12f475483d30830607e3f1b648201ecd0 100644 (file)
## Process this file with automake to produce Makefile.in
-#AUTOMAKE_OPTIONS= foreign
-#
-#ACLOCAL_M4= $(top_srcdir)/config/aclocal.m4
+#AUTOMAKE_OPTIONS = foreign
-EXTRA_DIST = cgi-demo.cgi.in piped-demo.pl.in shared-demo.pl.in stripes.pl.in bigtops.pl.in minmax.pl.in
+#ACLOCAL_M4 = $(top_srcdir)/config/aclocal.m4
+
+EXTRA_DIST = cgi-demo.cgi.in piped-demo.pl.in shared-demo.pl.in \
+ stripes.pl.in bigtops.pl.in minmax.pl.in 4charts.pl.in
examplesdir = $(prefix)/examples
-examples_SCRIPTS = cgi-demo.cgi piped-demo.pl shared-demo.pl stripes.pl bigtops.pl minmax.pl
+examples_SCRIPTS = cgi-demo.cgi piped-demo.pl shared-demo.pl \
+ stripes.pl bigtops.pl minmax.pl 4charts.pl
+
index 596fb0622b19da7670d529e5523ce38096779ae2..802197130380c730973b735d813809919fc54891 100755 (executable)
for (my $t=$START+1;
$t<$START+$STEP*$RUNS;
$t+=$STEP+int((rand()-0.5)*7)){
- $counter += 2500*sin($t/2000)*$STEP;
- my $data = (1000+500*sin($t/1000)).":".
- (1000+900*sin($t/2330)).":".
- (2000*cos($t/1550)).":".
- (3220*sin($t/3420)).":$counter";
+ $counter += int(2500*sin($t/2000)*$STEP);
+ my $data = int(1000+500*sin($t/1000)).":".
+ int(1000+900*sin($t/2330)).":".
+ int(2000*cos($t/1550)).":".
+ int(3220*sin($t/3420)).":$counter";
push(@options, "$t:$data");
RRDs::update $RRD1, "$t:$data";
if ($ERROR = RRDs::error) {
index c19695a0c42d289275fa593b546e2f03f85383c7..5c4c6dfaa663fa758a26d1653a55449c52133820 100755 (executable)
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",
}
}
RRDs::graph "stripes.png",
- "--title", 'Stripes Demo',
+ "--title", "Stripes Demo",
"--start", $start,
"--end", "start + 400 min",
"--interlace",
"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";
};