NAME
Net::ParSCP - Parallel secure copy
SYNOPSIS
# One liner: transfers 'file' to all
# the machines in cluster 'clu' but 'june'
$ perl -MNet::ParSCP \
-e 'parpush(sourcefile=>q{file}, destination=>q{clu-june:/tmp/})'
OPTIONS
Usage: parpush [ options ] sourcefile clusterexp1:/path1 clusterexp2:/path2 ...
Valid options:
--configfile file : Configuration file
--scpoptions : A string with the options for scp.
The default is no options and '-r' if
sourcefile is adirectory
--program : A string with the name of the program to use for secure copy
by default is 'scp'
--processes : Maximum number of concurrent processes
--verbose
--xterm : runs cssh to the target machines
--help : this help
--Version
DESCRIPTION
Functions in this module are for the implementation of the script parpush.
parpush
The only sub of interest is parpush
:
($okh, $pid) = parpush(
configfile => $configfile,
destination => [ 'cluster1:/path1', 'cluster2:/path2' ],
scp => $scp,
scpoptions => $scpoptions,
sourcefile => $sourcefile,
);
only sourcefile
and destination
are required. The other arguments are optional.
In a list context returns to hash references ($okh, $pid)
.
%$okh
is a hash with keys the names of the machines considered during the connection. The value is true (1) if the connection was closed succesfully, false otherwise.%$pid
is a hash with keys the names of the machines considered during the connection. The value is the process identifier of the process that made thescp
to that machine,undef
if the fork failed.
EXPORT
parpush
exec_cssh
help
version
usage
$VERBOSE
SEE ALSO
Cluster ssh: cssh http://sourceforge.net/projects/clusterssh/
Project C3 http://www.csm.ornl.gov/torc/C3/
AUTHOR
Casiano Rodriguez-Leon <casiano.rodriguez.leon@gmail.com>
COPYRIGHT AND LICENSE
Copyright (C) 2009-2009 by Casiano Rodriguez-Leon
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.