View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
David Muir Sharnoff > Proc-Parallel-0.601 > do.hosts


Annotate this POD

View/Report Bugs


 do.hosts - run commands across a cluster of systems at once


 do.hosts host-list-file [OPTIONS] command-to-run


        --series        Run commands in series rather than in parallel
        -N --NNN n      Run n commands per system, replace "NNN" in command with command number
        --counter       Replace =COUNTER= and =TOTAL= with a count and total command number
        -0              For -NNN and --counter count from zero instead of one
        --local         Do not ssh to remote systems (implies --name)
        --name          In command, replace =HOSTNAME= with the remote system name 
        --raw           Do not tag command output with hostnames
        --help          Display this message
        --NUM           Run at most NUM simultaneous commands (start more as others finish)


do.hosts is a command to run a commmand on a bunch of systems at once. It requires a file that lists the remote systems. In that file, multiple hosts can be put on the same line.

If the host-list-file isn't a valid filename, $0 will try to find the host-list-file by looking in:


It will append host-list-file to those locations. If host-list-file is "cluster1", it will look for:


The options can come before or after the host-list-file.

If the host-list-file does not contain any slashes (/) then it will not look in the current directory for it.


 do.hosts cluster1 uptime
 do.hosts cluster1 -N 2 echo NNN
 do.hosts cluster1 --counter echo =COUNTER=
 do.hosts cluster1 --local scp access_log =HOSTNAME=:/data/david/dsl
 do.hosts cluster1 --raw cat /data/david/dsl | wc
 do.hosts cluster1 --local scp =HOSTNAME=:/data/david/dsl foo.=HOSTNAME=
 do.hosts cluster1 --local --counter scp =HOSTNAME=:/data/david/dsl foo.=COUNTER=


Copyright (C) 2007-2008 SearchMe, Inc. Copyright (C) 2008-2010 David Sharnoff Copyright (C) 2011 Google, Inc. This package may be used and redistributed under the terms of either the Artistic 2.0 or LGPL 2.1 license.

syntax highlighting: