TOMAHAWK3(1)
β¨ TOMAHAWK3 β¨
okay bestie, welcome to tomahawk3, part of the tomahawk3 manual, section 1 π«Ά
π NAME π
tomahawk3 β enables to execute a command to many hosts. yes, many. like, all of them. at once. iconic behavior tbh π
πΈ SYNOPSIS πΈ
tomahawk3 [options] command
that's it. that's the whole vibe. options, then a command. slay.
π¦ DESCRIPTION π¦
tomahawk3 is a program that enables to execute a command into many hosts. literally the whole point. no cap.
$ tomahawk3 -h host1,host2,host3 uptime
---> so the 'uptime' command will be executed in host1, host2, and host3 with following output. look at this gorgeousness:
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
three hosts, one command, zero stress. main character energy fr fr π
π§ ssh
tomahawk3 executes a command via 'ssh'. You can specify options for ssh with -o/--ssh-options and can configure ssh behavior with $HOME/.ssh/config. so like, all your ssh customization? it's respected. we love a program that minds its business and also yours π
π hosts file
-h option enables you to specify hosts, another option '-f', which is specifying hosts files. hosts file is listing host names like this
host1
host2
host3
#host4
Starting with "#" means commenting the host out. so host4 said "not today" and stayed home π
β shell operators
tomahawk3 executes commands via shell(/bin/sh), so you can use '|' (pipe), '&&', '||' operators and so on. the whole shell toolbox is yours bestie, go wild:
$ tomahawk3 -h host1,host2 'ps auxww | grep python'
β¨ OPTIONS β¨
These programs follow the usual GNU command line syntax, with long options starting with two dashes ('--'). A summary of options is included below. For a complete description, see the Info files. (yes the Info files. they're out there. go look π)
-H,--hostsβ Specifies host names for sending commands. You can specify multiple hosts with','. comma-separated besties only π-f,--hosts-filesβ Specifies hosts files which listed host names for sending commands. You can specify multiple hosts files with','.
Format of hosts file is below.
web01
web02
#web03
web04
A line of starting with '#' disables a host. so web03 is on do-not-disturb mode π
-l,--prompt-login-passwordβ Prompts a password for ssh authentication at first. If the password is all the same between target hosts, you'll input a password just once. one password, infinite hosts, we stan efficiency π«Ά--login-password-stdinβ Read a SSH password from stdin instead of prompting. piping it in, very demure, very mindful πΈ-s,--prompt-sudo-passwordβ Prompts a password for sudo. π₯-c,--continue-on-errorβ Continues to send commands even if any errors. The default behavior is fail-safe, means thattomahawk3will stop if any errors. so like, by default it's a cautious queen, and this flag makes it a brave one π-p,--parallelβ Specifies a number of processes for parallel command execution. (default:1) If your machine has multiple cpu cores,--parallel 2 .. Nmight be faster. more cores, more chaos, more speed β‘-t,--timeoutβ Specifies timeout seconds for a command. β°-u,--ssh-userβ Specifies ssh user. The default is a current logged in user. yes, you. you're the default π-o,--ssh-optionsβ Specifies ssh options. π-F,--output-formatβ Specifies command output format. The default is'${user}@${host} % ${command}\n${output}\n'β so you can make the output look however you want. custom aesthetic, no cap.-V,--verify-outputβ Verify command output of all hosts. For additional information, seechecking-files-on-remote-hosts. π-C,--confβ Specifies configuration file path. For additional information, seeomit-command-line-options. π§
π ENVIRONMENT VARIABLES π
tomahawk's behavior is affected by the following environment variables. they're just out here influencing things, as env vars do.
π TOMAHAWK_ENV
This variable specifies an environment of 'production', 'testing' or 'development'. If TOMAHAWK_ENV=production specified, tomahawk3 or tomahawk-rsync3 prompt as "command "%s" will be executed %s hosts. Are you sure? [yes/NO]: ". The environment variable exists for mis-execution of a command.
bestie this one is a SAFETY NET and we are obsessed with it. it's giving "are you SURE you want to run that on prod" and honestly? thank you for your service π«‘
π SEE ALSO π
π AUTHOR π
Kazuhiro Oinuma, Kohei Maeda
π COPYRIGHT π
2011-2014, Kazuhiro Oinuma
okay that's the whole page bestie, you're officially a tomahawk3 girlie now π go execute some commands on some hosts, you've got this, periodt β¨
signing off from version 0.7.0, dated April 17, 2014 β the tomahawk3 manual page, forever iconic π¦
π¦ where this page comes from
- debian bookworm: python3-tomahawk 0.7.1-2.1 Β· LGPL-2.1-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms