MYDan::Util::MIO::SSH - Run multiple SSH commands in parallel.
use MYDan::Util::MIO::SSH; my @node = qw( host1 host2 ... ); my @cmd = qw( uptime ); my $ssh = MYDan::Util::MIO::SSH->new( map { $_ => \@cmd } @node ); my $result = $ssh->run( max => 32, timeout => 300 ); my $output = $result->{output}; my $error = $result->{error};
Run ssh commands in parallel. The following parameters may be defined in %param:
max : ( default 128 ) number of commands in parallel. timeout : ( default 300 ) number of seconds allotted for each command. sudo : ( default no sudo ) remote sudo user user : ( default logname ) connect as user pass : password
To install MYDan, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MYDan
CPAN shell
perl -MCPAN -e shell install MYDan
For more information on module installation, please visit the detailed CPAN module installation guide.