[smokeping-users] TelnetIOSPing & timeout, patch

Tobias Oetiker tobi at oetiker.ch
Fri Jul 6 09:07:04 CEST 2012


Hi Dmitry,

Today Dmitry Melekhov wrote:

> 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");
>

thanks ... added and updated the git repo

cheers
tobi

>
> Thank you!
>
>
> _______________________________________________
> smokeping-users mailing list
> smokeping-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users
>
>

-- 
Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten, Switzerland
http://it.oetiker.ch tobi at oetiker.ch ++41 62 775 9902 / sb: -9900



More information about the smokeping-users mailing list