index 91facb3f6cdf6ba66b6dc7adc0e59a281c0faec6..bf2abe8c438473ffbd809d635d2512c6f885269c 100644 (file)
=item B<RRDp::cmd> I<rrdtool commandline>
-pass commands on to RRDtool. check the RRDtool documentation for
+pass commands on to RRDtool. Check the RRDtool documentation for
more info on the RRDtool commands.
+B<Note>: Due to design limitations, B<RRDp::cmd> does not support the
+C<graph -> command - use C<graphv -> instead.
+
=item $answer = B<RRDp::read>
read RRDtool's response to your command. Note that the $answer variable will
is the total time RRDtool has been running.
The difference between user + system and real is the time spent
-waiting for things like the hard disk and new input from the perl
+waiting for things like the hard disk and new input from the Perl
script.
=item B<$RRDp::error_mode> and B<$RRDp::error>
Tobias Oetiker <tobi@oetiker.ch>
=cut
+
#' this is to make cperl.el happy
use strict;
sub end ();
sub read ();
-$VERSION=1.299907080300;
+$VERSION=1.4003;
sub start ($){
croak "rrdtool is already running"
}
$cmd =~ s/\n/ /gs;
$cmd =~ s/\s/ /gs;
+
+ # The generated graphs aren't necessarily terminated by a newline,
+ # causing RRDp::read() to wait for a line matching '^OK' forever.
+ if ($cmd =~ m/^\s*graph\s+-\s+/) {
+ croak "RRDp does not support the 'graph -' command - "
+ . "use 'graphv -' instead";
+ }
print RRDwriteHand "$cmd\n";
}