in reply to Using Net::SSH2 with Net::Telnet::Cisco

Almost forgot to mention- I am running PERL 5.8.8 on 64 bit Redhat running on VMWare.
  • Comment on Re: Using Net::SSH2 with Net::Telnet::Cisco

Replies are listed 'Best First'.
Re^2: Using Net::SSH2 with Net::Telnet::Cisco
by ryber (Acolyte) on Apr 05, 2012 at 13:40 UTC
    Sorry for the late follow up to this- but better late than never.

    Ultimately I was never able to make this work with threads, and switched back to a forking model which works fine. In addition to this problem, I was experiencing another issue with the threaded model whereby when the PERL process ran out of physical memory it crashed. I am guessing that is a problem with either the OS (RHEL 5.6) or the PERL implementation (v5.8.8 for x86_64).

    In any case, the forking model seems to be the way to go. It has no problem once it reaches the limit of physical memory on the box, and is just as fast if not slightly faster than the threaded version. The app also uses Telnet, so I was able to compare the threaded and forking versions by just disabling the non-threadsafe SSH component.

    I should mention that I was using what is now a pretty old version of Net::Appliance::Session- 1.36. Looks like they are now on version 3, so YMMV.