Rechercher une page de manuel

Chercher une autre page de manuel:


Langue: en

Version: 2003 December 28 (mandriva - 01/05/08)

Section: 1 (Commandes utilisateur)


tentakel - distributed command execution


tentakel [ -lhv ] [ -c file ] [ -g group ] [ command ]


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 configuration 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.


-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 configuration file. If not specified tentakel implicitely assumes the "default" group.
Display a list of possible group choices.
Display a brief help message.
Display version information.
The command that is to be executed on all hosts in the current group. If command is omitted, tentakel starts in interactive mode.


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 declarations are allowed.

In the first section you may set global variables like:

set var="value"

value must be enclosed in double quotes even if it does not contain spaces. To write the double quote characters itself in the value, you have to write two successive double quote characters, e. g. var="foo(""bar"")".

var must be one of the following:

The path where the ssh(1) binary is located.
The path where the rsh(1) binary is located.
You can choose between "ssh" and "rsh" (ssh is the default). A user may define additional methods by creating plugins, as explained later.
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.
The format controls how the output of the remote command is formatted. Most of the characters in format are output verbatim while some character sequences are treated special:
prints a literal \ character.
prints a newline character.
prints a tab character.
Denotes a formatting expression that is expanded dynamically. 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.
expanded to the name of the destination (ip or hostname).
expanded to the output of the remote command.
expanded to the exit status of the remote command.
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".
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.

Inside the parentheses you can specify variables that follow the same rules as the variables in the first section of the configuration file. Those parameters override the global parameters for this specific group. Parameters of sub-groups override those set in the enclosing group. An exception from this rule is the maxparallel parameter, whose value is always taken from the outermost group.

Group Members

A group definition ends with a whitespace-separated list of its members. Each item takes the form of:
[ + | @ ] name

name must consist of alphanumeric characters but is additionally allowed to contain dots. Each name is prepended by a type designator which specifies the members type. Possible types are:

Host inclusion. name is included and can be an ip address or a hostname.
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.


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.


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.
Display a list of available groups.
use groupname
Set the current group to groupname.
Display a list of affected hosts.
exec command
Execute command on all affected hosts.
Change the current configuration interactively. The default editor command is /usr/bin/vi but can be overridden by setting either of the VISUAL or EDITOR environment variables. Using the conf command does only affect the configuration of the running interactive tentakel process. It does not change any configuration file.
Exit tentakel. The same can be done by pressing ctrl-d.

If the readline(3) library is installed on the system you can use the tab key for automatic completion of partially entered command names.


$ 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.


Site-wide configuration file.
User-specific configuration file.
User-defined remote method plugins

The user-specific configuration file takes precedence over the site-wide one.


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.


Please visit There you will find up-to-date information about how to report bugs.


Written by Sebastian Stark and Marlon Berlin.


ssh(1), rsh(1),
N'ayez pas peur toutefois, je ne suis pas cinglé: si vous croyez au projet, vous ne risquez rien,
-- Jayce - Rassurant --