[smokeping-users] TelnetIOSPing & timeout, patch
Dmitry Melekhov
dm at belkam.com
Fri Jul 6 06:33:21 CEST 2012
Hello!
Several days we established link with very long delay and I found that
TelnetIOSPing always ends with probe timeout.
timeout for probe changes nothing, smokeping always says that probe timeout.
I found this is because Net::Telnet timeout is 10 secs (
http://search.cpan.org/~jrogers/Net-Telnet-3.03/lib/Net/Telnet.pm) and
probe exists telnet before 20 pings took place.
So here is simple patch:
dm at dm:~/smokeping-2.6.2/lib/Smokeping/probes$ diff -up
TelnetIOSPing.pm.orig TelnetIOSPing.pm
--- TelnetIOSPing.pm.orig 2012-07-06 08:25:27.514127708 +0400
+++ TelnetIOSPing.pm 2012-07-06 08:26:30.402738380 +0400
@@ -137,13 +137,15 @@ sub pingone ($$){
my $pssword = $target->{vars}{iospass};
my $bytes = $self->{properties}{packetsize};
my $pings = $self->pings($target);
+ my $timeout = $self->{properties}{timeout};
+
# do NOT call superclass ... the ping method MUST be overwriten
my %upd;
my @args = ();
- my $telnet = Net::Telnet->new();
+ my $telnet = Net::Telnet->new( Timeout => $timeout );
# These are for debugging
# $telnet->errmode("TIPreturn");
# $telnet->input_log("TIPinlog");
Thank you!
More information about the smokeping-users
mailing list