.\" Man page generated from reStructuredText. . .TH "TOMAHAWK" "1" "April 17, 2014" "0.7.0" "tomahawk" .SH NAME tomahawk \- enables to execute a command to many hosts . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp \fBtomahawk\fP [\fIoptions\fP] command .SH DESCRIPTION .sp \fBtomahawk\fP is a program that enables to execute a command into many hosts. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ tomahawk \-h host1,host2,host3 uptime .ft P .fi .UNINDENT .UNINDENT .sp \-\-\-> \(aquptime\(aq command will be executed in host1, host2, and host3 with following output. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C 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 .ft P .fi .UNINDENT .UNINDENT .SS ssh .sp tomahawk executes a command via \(aqssh\(aq. You can specify options for ssh with \-o/\-\-ssh\-options and can configure ssh behavior with $HOME/.ssh/config. .SS hosts file .sp \-h option enables you to specify hosts, another option \(aq\-f\(aq, which is specifying hosts files. hosts file is listing host names like this .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C host1 host2 host3 #host4 .ft P .fi .UNINDENT .UNINDENT .sp Starting with "#" means commenting the host out. .SS shell operators .sp tomahawk executes commands via shell(/bin/sh), so you can use \(aq|\(aq (pipe), \(aq&&\(aq, \(aq||\(aq operators and so on. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ tomahawk \-h host1,host2 \(aqps auxww | grep python\(aq .ft P .fi .UNINDENT .UNINDENT .SH OPTIONS .sp These programs follow the usual GNU command line syntax, with long options starting with two dashes (\(aq\-\-\(aq). A summary of options is included below. For a complete description, see the Info files. .SS \-H, \-\-hosts .sp Specifies host names for sending commands. You can specify multiple hosts with \(aq,\(aq. .SS \-f, \-\-hosts\-files .sp Specifies hosts files which listed host names for sending commands. You can specify multiple hosts files with \(aq,\(aq. .sp Format of hosts file is below. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C web01 web02 #web03 web04 .ft P .fi .UNINDENT .UNINDENT .sp A line of starting with \(aq#\(aq disables a host. .SS \-l, \-\-prompt\-login\-password .sp Prompts a password for ssh authentication at first. If the password is all the same between target hosts, you\(aqll input a password just once. .SS \-\-login\-password\-stdin .sp Read a SSH password from stdin instead of prompting. .SS \-s, \-\-prompt\-sudo\-password .sp Prompts a password for sudo. .SS \-c, \-\-continue\-on\-error .sp Continues to send commands even if any errors. The default behavior is fail\-safe, means that tomahawk will stop if any errors. .SS \-p, \-\-parallel .sp Specifies a number of processes for parallel command execution. (default: 1) If your machine has multiple cpu cores, \-\-parallel 2 .. N might be faster. .SS \-t, \-\-timeout .sp Specifies timeout seconds for a command. .SS \-u, \-\-ssh\-user .sp Specifies ssh user. The default is a current logged in user. .SS \-o, \-\-ssh\-options .sp Specifies ssh options. .SS \-F, \-\-output\-format .sp Specifies command output format. The default is \fB\(aq${user}@${host} % ${command}\en${output}\en\(aq\fP .SS \-V, \-\-verify\-output .sp Verify command output of all hosts. For additional information, see \fIchecking\-files\-on\-remote\-hosts\fP .SS \-C, \-\-conf .sp Specifies configuration file path. For additional information, see \fIomit\-command\-line\-options\fP .SH ENVIRONMENT VARIABLES .sp tomahawk\(aqs behavior is affected by the following environment variables. .SS TOMAHAWK_ENV .sp This variable specifies an environment of \(aqproduction\(aq, \(aqtesting\(aq or \(aqdevelopment\(aq. If TOMAHAWK_ENV=production specified, \fItomahawk\fP or \fItomahawk\-rsync\fP prompt as "command "%s" will be executed %s hosts. Are you sure? [yes/NO]: ". The environment variable exists for mis\-execution of a command. .SH SEE ALSO .INDENT 0.0 .IP \(bu 2 \fItomahawk\-rsync(1)\fP .IP \(bu 2 \fIssh(1)\fP .UNINDENT .SH AUTHOR Kazuhiro Oinuma, Kohei Maeda .SH COPYRIGHT 2011-2014, Kazuhiro Oinuma .\" Generated by docutils manpage writer. .