Net::Telnet - problem with very large buffer
From: Paul (pmacadam_at_gmail.com)
Date: 06/25/04
- Next message: Wolfgang: "Behavior of module Archive::Tar->new('file.tar.gz',1);"
- Previous message: Sisyphus: "Re: trouble with high precision computation using Math::BigFloat"
- Next in thread: Jay Rogers: "Re: Net::Telnet - problem with very large buffer"
- Reply: Jay Rogers: "Re: Net::Telnet - problem with very large buffer"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 24 Jun 2004 21:56:04 -0700
Wondering whether anyone has encountered and solved this problem:
I'm using Net::Telnet to collect output from a CLI. It has worked
perfectly for more than a year and a half -- until now.
The command in question produces at least a 1,000 lines of output.
What's strange is absolutely all of the output is in the input_log,
but I cannot get a single character from getline().
Any thoughts / remedies?
Code below:
$self->{'telnet'}->input_log('/tmp/telnet.in');
@screen = $self->{'telnet'}->cmd(-string=>$cmd_str,
-cmd_remove_mode=>1,
-prompt=>$self->cli_prompt_str,
-timeout=>90,
);
# If screen array has only one element
# that is the empty string,
# try to drain socket another way
if ( !(@screen) || ((@screen == 1) && !($screen[0])) ) {
$self->log('Warning: No data in buffer...');
while ( (my $line = $self->{'telnet'}->getline(-timeout=>15)) )
{
push(@screen, $line);
}
}
Again, '/tmp/telnet.in' has all of the data that I expect from the
command, but neither cmd() nor getline() seems able to retrieve data.
Am I blowing up Net::Telnet's internal buffer with the large result
set?
PM
- Next message: Wolfgang: "Behavior of module Archive::Tar->new('file.tar.gz',1);"
- Previous message: Sisyphus: "Re: trouble with high precision computation using Math::BigFloat"
- Next in thread: Jay Rogers: "Re: Net::Telnet - problem with very large buffer"
- Reply: Jay Rogers: "Re: Net::Telnet - problem with very large buffer"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|