#! @PERL@
-#makes things work when run without install
-use lib qw( ../bindings/perl-piped/blib/lib ../lib/perl );
-
-#makes programm work AFTER install
use lib qw( @prefix@/lib/perl );
use RRDp;
$PNG = "piped-demo.png";
# some magic to find the correct rrdtol executable
-if ( -x "@prefix@/bin/rrdtool") {
- RRDp::start "@prefix@/bin/rrdtool";
+if ( -x "@exec_prefix@/bin/rrdtool") {
+ RRDp::start "@exec_prefix@/bin/rrdtool";
} elsif ( -x "../bin/rrdtool") {
RRDp::start "../bin/rrdtool";
} else {
print "* Creating $GRUNS SVG graphs: $SVG\n\n";
$now = time;
+$localtime = scalar localtime(time);
+$localtime = s/:/\\:/g;
for ($i=0;$i<$GRUNS;$i++) {
RRDp::cmd "graph $SVG ", "--title 'Test GRAPH' ",
"--imgformat SVG --height 150 --vertical-label 'Dummy Units' ".
"GPRINT:calc:MAX:'Max calc\\: %1.2lf %S'",
"VRULE:".($now-3600)."#008877:'60 Minutes ago'",
"COMMENT:'\\s'",
- "COMMENT:'Graph created on: ".localtime(time())."\\c'";
+ "COMMENT:'Graph created on\\: ".$localtime."\\c'";
$answer = RRDp::read;
}
$now = time;
($user1,$sys1,$real1) = ($RRDp::user,$RRDp::sys,$RRDp::real);
+my $local = "".localtime(time());
+$local =~ s/:/\\:/g;
+
for ($i=0;$i<$GRUNS;$i++) {
RRDp::cmd "graph $PNG ", "--title 'Test GRAPH' ",
"--imgformat PNG --height 150 --vertical-label 'Dummy Units' ".
"GPRINT:calc:MAX:'Max calc\\: %1.2lf %S'",
"VRULE:".($now-3600)."#008877:'60 Minutes ago'",
"COMMENT:'\\s'",
- "COMMENT:'Graph created on: ".localtime(time())."\\c'";
+ "COMMENT:'Graph created on\\: $local\\c'";
$answer = RRDp::read;
}