Why not adopt me?
NAME
do.hosts - run commands across a cluster of systems at once
USAGE
do.hosts host-list-file [OPTIONS] command-to-run
OPTIONS
--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)
DESCRIPTION
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:
$ENV{DO_DOT_HOSTS_LISTS}
$ENV{HOME}/.hosts.
It will append host-list-file to those locations. If host-list-file is "cluster1", it will look for:
$ENV{DO_DOT_HOSTS_LISTS}cluster1
$ENV{HOME}/.hosts.cluster1
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.
EXAMPLES
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=
LICENSE
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.