3 use lib qw( @prefix@/lib/perl );
12 RRDs::create ($rrd, "--start",$start-1, "--step",300,
14 "RRA:AVERAGE:0.5:1:300",
18 my $ERROR = RRDs::error;
19 die "$0: unable to create `$rrd': $ERROR\n" if $ERROR;
21 # dropt some data into the rrd
23 for ($t=$start; $t<$start+300*300; $t+=300){
24 RRDs::update $rrd, "$t:".(sin($t/3000)*50+50);
25 if ($ERROR = RRDs::error) {
26 die "$0: unable to update `$rrd': $ERROR\n";
30 RRDs::graph "$name.png",
31 "--title", uc($name)." Demo",
38 "DEF:a=$rrd:a:AVERAGE",
46 if ($ERROR = RRDs::error) {
47 die "ERROR: $ERROR\n";
51 print "This script has created $name.png in the current directory\n";
52 print "This demonstrates the use of MIN and MAX archives\n";