Net::SSH::Perl slower than expected
- From: "Ishmael" <stahl.karl@xxxxxxxxx>
- Date: 17 Jan 2007 11:18:19 -0800
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?
.
- Follow-Ups:
- Re: Net::SSH::Perl slower than expected
- From: rkb
- Re: Net::SSH::Perl slower than expected
- Prev by Date: Re: Perl & DBI cannot locate
- Next by Date: Re: Tips on module selection for shell and/or commandline 'subcommand' behavior
- Previous by thread: Re: Perl & DBI cannot locate
- Next by thread: Re: Net::SSH::Perl slower than expected
- Index(es):
Relevant Pages
|
|