Good morning Salva,


I think you lead us to the correct track... :-)


open OUT, ">", "./trace.out"; my $line =0; foreach (@cmdout) { $line++; my $bytes = print $line.": ".$_; print OUT "$line: bytes: $bytes, err: $! \n"; } close(OUT);


IF everything is fine trace looks like this for all lines:
... 1880: bytes: 1, err: Inappropriate ioctl for device 1881: bytes: 1, err: Inappropriate ioctl for device 1882: bytes: 1, err: Inappropriate ioctl for device 1883: bytes: 1, err: Inappropriate ioctl for device 1884: bytes: 1, err: Inappropriate ioctl for device ...
IF it starts to fail:
... 1891: bytes: 1, err: Inappropriate ioctl for device 1892: bytes: 1, err: Inappropriate ioctl for device 1893: bytes: , err: Resource temporarily unavailable 1894: bytes: , err: Resource temporarily unavailable 1895: bytes: , err: Resource temporarily unavailable 1896: bytes: , err: Resource temporarily unavailable 1897: bytes: , err: Resource temporarily unavailable ...


Does this ring a bell?
update caught it in strace:
write(1, "07651738\n1313: switchport acce"..., 4096) = 4096 write(1, ": interface Ethernet2/36\n1426: "..., 4096) = 4096 write(1, "ntrusted\n1539: service-policy "..., 4096) = 4096 write(1, "torm-control broadcast level 10."..., 4096) = 4096 write(1, "rol broadcast level 10.00\n1782: "..., 4096) = -1 EAGAIN (Re +source temporarily unavailable) write(1, "t level 10.00\n1894: service-po"..., 4096) = -1 EAGAIN (Re +source temporarily unavailable) write(1, "e-policy type queuing input N7K-"..., 4096) = -1 EAGAIN (Res +ource temporarily unavailable) write(1, "141: channel-group 1305 mode a"..., 4096) = -1 EAGAIN (Res +ource temporarily unavailable) write(1, "storm-control broadcast level 10"..., 4096) = -1 EAGAIN (Res +ource temporarily unavailable)

In reply to Re^18: Net::OpenSSH loosing lines ins reply by Andy16
in thread Net::OpenSSH loosing lines ins reply by Andy16

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.