Table Of Contents

Next topic

How to install tomahawk

This Page

tomahawk 0.4.4 documentation

What is tomahawk?

tomahawk enables following 3 things.

  • Executes a command into many remote hosts
  • Copy files to many remote hosts
  • Copy files from remote hosts to local

Executes a command into many remote hosts

tomahawk is a program that enables to execute a command into many hosts.

$ tomahawk -h host1,host2,host3 uptime

—> “uptime” command will be executed in host1, host2, and host3 with following output.

oinume@host1 % uptime
22:41:27 up 10 days,  3:26,  1 users,  load average: 1.11, 1.13, 1.11

oinume@host2 % uptime
22:41:28 up 20 days,  4:26,  2 users,  load average: 2.11, 2.13, 2.11

oinume@host3 % uptime
22:41:29 up 30 days,  5:26,  3 users,  load average: 3.11, 3.13, 3.11

Copy files to many remote hosts or copy files from remote hosts to local

tomahawk-rsync is a program that enables to copy files <into/from> many hosts.

$ tomahawk-rsync -h host1,host2,host3 test.py /tmp/test.py

—> “test.py” is copied to host1, host2 and host3.

$ tomahawk-rsync -f web.list /usr/local/apache2/conf/httpd.conf /tmp/httpd.conf

—> “httpd.conf” is copied to hosts which listed in “web.list”.

$ tomahawk-rsync -h host1,host2 -m pull /usr/local/apache2/conf/httpd.conf /tmp/conf/

—> “httpd.conf” is copied from host1 and host2 to local directory /tmp/conf as “host1__httpd.conf” and “host2__httpd.conf”.

Indices and tables