Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: telnet max buffer exceeded

by graff (Chancellor)
on May 17, 2014 at 02:28 UTC ( #1086409=note: print w/replies, xml ) Need Help??

in reply to telnet max buffer exceeded

Contrary to what BrowserUK said, it seems like your usage is consistent with what Net::Telnet expects. Having looked at the source code, "-max_buffer_length" and "-Max_Buffer_Length" should also work. Or, you could use the method call on the object itself:
my $obj = Net::Telnet->new( ); $obj->max_buffer_length( 50*1024*1024 );
But I would be very surprised if that behaved any differently.

It would be helpful to know how you are trying to fetch the input into your script. If you aren't using $obj->get(); maybe you should be. If you're using any sort of line-oriented method, it does seem strange that a remote process could spew many MB of data without ever emitting something that looks like a line termination, but that could happen.

Anyway, if that's what you're dealing with, obj->get() will just give you arbitrary pieces as you call it (and as input becomes available). I presume you know what you're supposed to do with such data, and can figure out how to parse your way through the pieces...

Replies are listed 'Best First'.
Re^2: telnet max buffer exceeded
by newkij1 (Initiate) on May 19, 2014 at 17:15 UTC

    After successfully logging in to my server I am using:
    I am using my @randomarray = $obj-> cmd ("Some command") ;

    I do not have to wait for input to become available. It is just that input is way too big. I will try your method above and let you know if that works.
    Thanks \m/

Re^2: telnet max buffer exceeded
by newkij1 (Initiate) on May 29, 2014 at 14:43 UTC
    Works :D
    Thanks, graff :D :D :D

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1086409]
[Discipulus]: good yaaawn.. morning folks!

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (2)
As of 2018-05-21 07:09 GMT
Find Nodes?
    Voting Booth?