SYNOPSIS
tentakel [ -lhv ] [ -c file ] [ -g group ] [ command ]
DESCRIPTION
tentakel is a program for executing the same command on many hosts in
parallel using various remote methods.
It can make use of several sets of hosts that are defined in a configu-
ration file as groups.
The command is executed in parallel on all hosts in this group. By
default, every result is printed to stdout. The output format can be
defined for each group.
If no command is specified tentakel goes into interactive mode which
can be used for repeated commands.
The requirements on the remote hosts depend on the selected remote
method. The ssh method, for example, needs a running sshd on the remote
side. tentakel itself only needs to be installed on the controlling
host.
OPTIONS
-c file
Use file as the configuration file if specified, otherwise try
$HOME/.tentakel/tentakel.conf and finally /etc/tentakel.conf.
-g groupname
Select the group groupname The group must be defined in the con-
figuration file. If not specified tentakel implicitely assumes
the "default" group.
-l Display a list of possible group choices.
-h Display a brief help message.
-v Display version information.
command
The command that is to be executed on all hosts in the current
group. If command is omitted, tentakel starts in interactive
mode.
CONFIGURATION FILE
Everything appearing after a # character will be ignored to the next
newline. Leading whitespace will be ignored. Host and List objects
become members of the last named group declaration. Forward declara-
tions are allowed.
In the first section you may set global variables like:
set var="value"
method You can choose between "ssh" and "rsh" (ssh is the default). A
user may define additional methods by creating plugins, as
explained later.
user The user that is used to login to the remote host. If no user is
specified, the effective uid of the tentakel process is used.
format The format controls how the output of the remote command is for-
matted. Most of the characters in format are output verbatim
while some character sequences are treated special:
\\ prints a literal \ character.
\n prints a newline character.
\t prints a tab character.
%c Denotes a formatting expression that is expanded dynami-
cally. Formatting expressions consist of a % followed by
a single character c and are expanded depending on the
value of c while c can be one of:
% a literal % character.
d expanded to the name of the destination (ip or
hostname).
o expanded to the output of the remote command.
s expanded to the exit status of the remote command.
t expanded to the time (in seconds) that was needed
to execute the remote command. This includes the
time for network overhead etc.
The default format is "### %d(stat: %s, dur(s): %t):\n%o\n".
maxparallel
Run at most maxparallel commands in parallel. This is useful to
avoid, for example, a command overloading a download server. "0"
means no limit (default). Setting it to "1" is more or less
senseless.
Group Definition
Definitions of groups make up the second section of the configuration
file. A new group is defined by a group statement of the form:
group name ( [ param1 [, param2 ... ] ] ) members
name must consist only of alphanumeric characters.
allowed to contain dots. Each name is prepended by a type designator
which specifies the members type. Possible types are:
+name Host inclusion. name is included and can be an ip
address or a hostname.
@name Group inclusion. All members of group name are included.
Forward declarations are allowed.
Configuration File Example
set ssh_path="/usr/bin/ssh"
group myGroup (method="ssh", user="stark") +localhost @others
group others () +hostA +hostB +hostC
For more examples please see the example configuration file.
PLUGINS
The set of remote methods tentakel can use to execute commands can be
extended by means of plugins. A plugin is a single Python module and
must appear in the $HOME/.tentakel/plugins/ directory. Inside a plugin
an arbitrary number of subclasses of the RemoteCommand class may be
defined. Each class corresponds to one remote method.
By registering a plugin the set of possible choices for the method
parameter can be extended.
For further information please refer to the PLUGINS document which
should be contained in your tentakel installation.
INTERACTIVE MODE
The interactive mode has several advantages:
- it's easier if more than one command needs to be executed
- you can leave out some quoting for the command
- the current configuration can be changed interactively
The following commands are available in interactive sessions:
help command
Display a brief help message on command.
listgroups
Display a list of available groups.
use groupname
Set the current group to groupname.
hosts Display a list of affected hosts.
exec command
Execute command on all affected hosts.
$ tentakel -g myGroup uptime
This command executes the uptime(1) command on all hosts defined in
group myGroup. The whole output (even stderr) of each host is printed
according to the format string.
FILES
/etc/tentakel.conf
Site-wide configuration file.
$HOME/.tentakel/tentakel.conf
User-specific configuration file.
$HOME/.tentakel/plugins/
User-defined remote method plugins
The user-specific configuration file takes precedence over the site-
wide one.
BUGS
tentakel uses threads. This restricts the usage to platforms that have
a working threads implementation supported by Python.
Currently, ssh(1) and rsh(1) are the only supported remote methods.
REPORTING BUGS
Please visit http://tentakel.biskalar.de/. There you will find up-to-
date information about how to report bugs.
AUTHOR
Written by Sebastian Stark and Marlon Berlin.
SEE ALSO
ssh(1), rsh(1), http://tentakel.biskalar.de/
2003 December 28 TENTAKEL(1)
Man(1) output converted with
man2html