Net::SSH::Perl slower than expected



I've written a script to get usage statistics about all the clients on
my network. It works by SSHing to each client, running 'top' and
getting the information I want (by the way, does anyone know of a
better way to do this?). In the original version, I used Net::SSH,
which is just a wrapper around the local 'ssh' command. This works,
but is slower than I'd like, because I need to run more than one
command on each machine, which requires opening a new SSH connection
each time. I was very excited about the possibility of using
Net::SSH::Perl since it supposedly allows a connection to stay open (at
least under SSH V2, which is what I have), allowing multiple commands
to be run without the overhead of logging in. Alas, it turns out to be
even slower than the original. Now, if I manually open a terminal
window, then ssh onto another machine, it sometimes takes a while
(especially if it is being heavily used), but once I've got the
terminal open, running 'top' (and any other commands) from the command
line is instantaneous. Does anyone know how to get this behavior using
Net::SSH::Perl?

.



Relevant Pages

  • Re: Net::SSH::Perl slower than expected
    ... which is just a wrapper around the local 'ssh' command. ... even slower than the original. ... it's missing 3 dependency modules. ...
    (comp.lang.perl.modules)
  • Client IP for xterm connection
    ... When clients connect to a box with telnet or ssh one admin can see ... If a client connects with xterm then what will be the command for the ...
    (comp.os.linux.misc)
  • RE: Commentary on the seven words
    ... When I was an operating systems programmer we all too often forgot that the Operating system existed to support the application, not the other way around. ... A Because the application that we run uses a telnet client that doesn't support ssh - and that's why I can't run ssh on this system. ... I administrate one system that has 128 clients on it and it's ...
    (RedHat)
  • Re: Really need help on this one
    ... Is there a way to read the output of a particular command into ... Heres a better example using ssh. ... set timeout $timeout ... exec kill -9 $pid ...
    (comp.lang.tcl)
  • OpenSSH 3.7.1p2 With NIS+ Password Authentication Problem
    ... > only windows SSH clients (I've tried SecureCRT and SSH.com's SSH ... > authentication, it works, but it asks me TWICE ... Your Windows clients are using password authentication. ... But if you run NIS+ at security level 2 the user ...
    (SunManagers)