I'm running one thread for the purposes of debugging, this will eventually have to be set to ~8-16. The logic all works and based on my reading of the documentation the reason I'm not getting anything in @cmdoutput is because it can't find the '#'. I have been playing with timeouts for a while. Here are my logs:

$ cat /tmp/input.log Trying to connect to tftp server...... TFTP put operation failed:No route to host + Trying to connect to tftp server...... TFTP put operation was successful + Copy complete, now saving to disk (please wait)...
$ cat /tmp/output.log copy startup-config tftp://192.168.0.206/switches/conf/172.16.2.11-con +fg vrf default copy startup-config tftp://192.168.0.206/switches/conf/172.16.2.11-con +fg vrf management

I added a few '\n' as you can see above with the same result. when I run the commands manually on the switch I get the following(it takes about 1-2seconds to run manually):

ewfmb_179_cc7_b# copy startup-config tftp://192.168.0.206/switches/con +f/172.16.2.11-confg vrf management Trying to connect to tftp server...... Connection to Server Established. TFTP put operation was successful + Copy complete, now saving to disk (please wait)... ewfmb_179_cc7_b#

I send the command twice only because some switches use a management vrf and others do not, that is why you see the first output error with 'no route to host'.


In reply to Re^2: Using Net::SSH2::Cisco by mroe1234
in thread Using Net::SSH2::Cisco by mroe1234

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.