X-Git-Url: https://git.octo.it/?p=rrdtool.git;a=blobdiff_plain;f=bindings%2Fperl-piped%2FRRDp.pm;h=49c93696f50026d1449430c0b8cce96136ae32db;hp=31e10438a786e03eca289dc1802fca4e83e364c4;hb=56d67cdd0c5b2c27c9242a3d5810c7184917f663;hpb=219fd9224e3117dcf59df8818d4e9e3eab26022a diff --git a/bindings/perl-piped/RRDp.pm b/bindings/perl-piped/RRDp.pm index 31e1043..49c9369 100644 --- a/bindings/perl-piped/RRDp.pm +++ b/bindings/perl-piped/RRDp.pm @@ -42,9 +42,12 @@ start RRDtool. The argument must be the path to the RRDtool executable =item B I -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: Due to design limitations, B does not support the +C command - use C instead. + =item $answer = B read RRDtool's response to your command. Note that the $answer variable will @@ -66,7 +69,7 @@ running, System time is the time spend in system calls and real time 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> @@ -121,7 +124,7 @@ sub cmd (@); sub end (); sub read (); -$VERSION=1.3002; +$VERSION=1.4000; sub start ($){ croak "rrdtool is already running" @@ -187,6 +190,13 @@ sub cmd (@){ } $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"; }