Statistics
| Branch: | Tag: | Revision:

root / man / ganeti-listrunner.rst @ 354c4f62

History | View | Annotate | Download (2.7 kB)

1
ganeti-listrunner(8) Ganeti | Version @GANETI_VERSION@
2
======================================================
3

    
4
NAME
5
----
6

    
7
ganeti-listrunner - Run commands in parallel over multiple machines
8

    
9

    
10
SYNOPSIS
11
--------
12

    
13
**ganeti-listrunner** ``-l`` *logdir*
14
{``-x`` *executable* | ``-c`` *shell-cmd*}
15
{``-f`` *hostfile* | ``-h`` *hostlist*}
16
[``-a`` *aux-file*]
17
[``-b`` *batch-size*]
18
[``-u`` *username*]
19
[``-A``]
20

    
21

    
22
DESCRIPTION
23
-----------
24

    
25
**ganeti-listrunner** is a tool to run commands in parallel over multiple
26
machines. It differs from ``dsh`` or other tools in that it asks for the
27
password once (if not using ``ssh-agent``) and then reuses the password to
28
connect to all machines, thus being easily usable even when public key
29
authentication or Kerberos authentication is not available.
30

    
31
It can run either a command or a script (which gets uploaded first and deleted
32
after execution) on a  list  of hosts provided either via a file (one host per
33
line) or as a comma-separated list on the commandline. The output (stdout and
34
stderr are merged) of the remote execution is written to a logfile. One logfile
35
per  host  is written.
36

    
37

    
38
OPTIONS
39
-------
40

    
41
The options that can be passed to the program are as follows:
42

    
43
``-l`` *logdir*
44
  The directory under which the logfiles files should be written.
45

    
46
``-x`` *executable*
47
  The executable to copy and run on the target hosts.
48

    
49
``-c`` *shell-cmd*
50
  The shell command to run on the remote hosts.
51

    
52
``-f`` *hostfile*
53
  The file with the target hosts, one hostname per line.
54

    
55
``-h`` *hostlist*
56
  Comma-separated list of target hosts.
57

    
58
``-a`` *aux-file*
59
  A file to copy to the target hosts. Can be given multiple times, in which case
60
  all files will be copied to the temporary directory. The executable or the
61
  shell command will be run from the (temporary) directory where these files
62
  have been copied.
63

    
64
``-b`` *batch-size*
65
  The host list will be split into batches of batch-size which will be processed
66
  in parallel. The default if 15, and should be increased if faster processing
67
  is needed.
68

    
69
``-u`` *username*
70
  Username to connect as instead of the default root username.
71

    
72
``-A``
73
  Use an existing ssh-agent instead of password authentication.
74

    
75
``--args``
76
  Arguments to pass to executable (``-x``).
77

    
78

    
79
EXIT STATUS
80
-----------
81

    
82
The exist status of the command will be zero, unless it was aborted in some way
83
(e.g. ^C).
84

    
85

    
86
EXAMPLE
87
-------
88

    
89
Run a command on a list of hosts:
90

    
91
.. code-block:: bash
92

    
93
  listrunner -l logdir -c "uname -a" -h host1,host2,host3
94

    
95
Upload a script, some auxiliary files and run the script:
96

    
97
.. code-block:: bash
98

    
99
  listrunner -l logdir -x runme.sh \
100
    -a seed.dat -a golden.dat \
101
    -h host1,host2,host3
102

    
103

    
104
SEE ALSO
105
--------
106

    
107
**dsh**\(1), **cssh**\(1)
108

    
109
.. vim: set textwidth=72 :
110
.. Local Variables:
111
.. mode: rst
112
.. fill-column: 72
113
.. End: