develooper Front page | perl.perl5.porters | Postings from July 2005

[perl #36533] Telnet.pm bug

From:
Doug Harper
Date:
July 14, 2005 02:29
Subject:
[perl #36533] Telnet.pm bug
Message ID:
rt-3.0.11-36533-117216.12.467678074599@perl.org
# New Ticket Created by  Doug Harper 
# Please include the string:  [perl #36533]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/rt3/Ticket/Display.html?id=36533 >


When I telnet into one of our switches and execute above a certain number of commands, I get that it thinks I got an EOF.

See example below and I have attached the script and sample output.

while (<CMDLIST>) {
   printf "----------- [%3d/%-3d] ------------\n", ++$count, $total;
   print;
   select(undef, undef, undef, $DELAY);
   @CLIOUT = $t->cmd("$_"); 
   print @CLIOUT, "\n";
}
$t->close;

With $DELAY set to anything less than 4 ms, I would get:
  ==> pattern match read eof at baseline.pl1 line 66
 <<cmd.lst>>  <<sample.txt>> 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
With Errmode => return 
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

$ sample lab500 mootman
Processing...

------------------- [ 1/13 ] ----------------
moreoff
lab500#
------------------- [ 2/13 ] ----------------
get node.147.0
1.3.6.1.4.1.277.1.3.147.0 = 2 (Integer)
lab500#
------------------- [ 3/13 ] ----------------
get node.147.0
1.3.6.1.4.1.277.1.3.147.0 = 2 (Integer)
lab500#
------------------- [ 4/13 ] ----------------
get node.147.0
1.3.6.1.4.1.277.1.3.147.0 = 2 (Integer)
lab500#
------------------- [ 5/13 ] ----------------
get node.147.0
1.3.6.1.4.1.277.1.3.147.0 = 2 (Integer)
lab500#
------------------- [ 6/13 ] ----------------
get node.147.0
1.3.6.1.4.1.277.1.3.147.0 = 2 (Integer)
lab500#
------------------- [ 7/13 ] ----------------
get node.147.0
1.3.6.1.4.1.277.1.3.147.0 = 2 (Integer)
lab500#
------------------- [ 8/13 ] ----------------
get node.147.0
1.3.6.1.4.1.277.1.3.147.0 = 2 (Integer)
lab500#
------------------- [ 9/13 ] ----------------
get node.147.0
nok...Bad file number
------------------- [ 10/13 ] ----------------
get node.147.0
nok...Bad file number
------------------- [ 11/13 ] ----------------
get node.147.0
nok...Bad file number
------------------- [ 12/13 ] ----------------
get node.147.0
nok...Bad file number
------------------- [ 13/13 ] ----------------
moreon
nok...Bad file number

* * * T H E E N D * * *
$

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
With Errmode => die
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
$ sample lab500 mootman
Processing...

------------------- [ 1/13 ] ----------------
moreoff
lab500#
------------------- [ 2/13 ] ----------------
get node.147.0
1.3.6.1.4.1.277.1.3.147.0 = 2 (Integer)
lab500#
------------------- [ 3/13 ] ----------------
get node.147.0
1.3.6.1.4.1.277.1.3.147.0 = 2 (Integer)
lab500#
------------------- [ 4/13 ] ----------------
get node.147.0
1.3.6.1.4.1.277.1.3.147.0 = 2 (Integer)
lab500#
------------------- [ 5/13 ] ----------------
get node.147.0
1.3.6.1.4.1.277.1.3.147.0 = 2 (Integer)
lab500#
------------------- [ 6/13 ] ----------------
get node.147.0
1.3.6.1.4.1.277.1.3.147.0 = 2 (Integer)
lab500#
------------------- [ 7/13 ] ----------------
get node.147.0
1.3.6.1.4.1.277.1.3.147.0 = 2 (Integer)
lab500#
------------------- [ 8/13 ] ----------------
get node.147.0
1.3.6.1.4.1.277.1.3.147.0 = 2 (Integer)
lab500#
------------------- [ 9/13 ] ----------------
get node.147.0
pattern match read eof at sample line 49
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++





nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About