parallel-nuke(1)

πŸ’– parallel-nuke β€” the manual, but make it make sense πŸ’–

okay so bestie, welcome to the General Commands Manual page for parallel-nuke, and no, it's not about your group chat after a fight β€” it's about killing processes on a whole bunch of hosts at the same time. we're in the General Commands Manual section, and I'm gonna walk you through every single flag because you deserve the full tea. 🫢


✨ NAME ✨

parallel-nuke β€” parallel process kill program πŸ’…

fr fr that's it. it's the group-chat mass-remove but for processes, across hosts, in parallel.


✨ SYNOPSIS ✨

parallel-nuke [-vA] [-h hosts_file] [-H [user@]host[:port]] [-l user]
[-p par] [-o outdir] [-e errdir] [-t timeout] [-O options] [-x args] [-X
arg] pattern

like... look at her. she's got a pattern at the end and everything. that's the main character move. πŸ‘‘


✨ DESCRIPTION ✨

parallel-nuke is a program for killing processes in parallel on a number of hosts. πŸ’€βœ¨

it provides features such as passing a password to ssh, saving output to files, and timing out. that's the whole vibe. it does the thing, on many machines, at once, and it's lowkey iconic for it.


✨ OPTIONS ✨

every single one, in order, no skips, no skimming. bestie behaviour only. πŸŽ€

  • -h host_file, --hosts host_file β€” read hosts from the given host_file. lines in the host file are of the form [user@]host[:port] and can include blank lines and comments (lines beginning with "#"). if multiple host files are given (the -h option is used more than once), then parallel-nuke behaves as though these files were concatenated together. and if a host is specified multiple times, then parallel-nuke will connect the given number of times. yes, multiple times. it's thorough like that. πŸ™ˆ
  • -H [user@]host[:port], --host [user@]host[:port], -H "[user@]host[:port] [ [user@]host[:port ] ... ]", --host "[user@]host[:port] [ [user@]host[:port ] ... ]" β€” add the given host strings to the list of hosts. this option may be given multiple times, and may be used in conjunction with the -h option. so yes, you can stack them. it's giving options on options. πŸ’…
  • -l user, --user user β€” use the given username as the default for any host entries that don't specifically specify a user. the fallback bestie. 🫢
  • -p parallelism, --par parallelism β€” use the given number as the maximum number of concurrent connections. that's your "how many people can be in the call at once" number.
  • -t timeout, --timeout timeout β€” make connections time out after the given number of seconds. with a value of 0, parallel-nuke will not timeout any connections. zero means never, so like, choose wisely. 😭
  • -o outdir, --outdir outdir β€” save standard output to files in the given directory. filenames are of the form [user@]host[:port][.num] where the user and port are only included for hosts that explicitly specify them. the number is a counter that is incremented each time for hosts that are specified more than once. so repeat offenders get a cute lil .num suffix. πŸ“
  • -e errdir, --errdir errdir β€” save standard error to files in the given directory. filenames are of the same form as with the -o option. same energy, different stream. ✨
  • -x args, --extra-args args β€” passes extra SSH command-line arguments (see the ssh(1) man page for more information about SSH arguments). this option may be specified multiple times. the arguments are processed to split on whitespace, protect text within quotes, and escape with backslashes. to pass arguments without such processing, use the -X option instead. ok so -x is the ✨processed✨ one, remember that, it matters. 🧚
  • -X arg, --extra-arg arg β€” passes a single SSH command-line argument (see the ssh(1) man page for more information about SSH arguments). unlike the -x option, no processing is performed on the argument, including word splitting. to pass multiple command-line arguments, use the option once for each argument. she's raw. she's literal. she's not gonna touch your string. πŸ’œ
  • -O options, --options options β€” SSH options in the format used in the SSH configuration file (see the ssh_config(5) man page for more information). this option may be specified multiple times. stack it, bestie. 🌸
  • -A, --askpass β€” prompt for a password and pass it to ssh. the password may be used for either to unlock a key or for password authentication. the password is transferred in a fairly secure manner (e.g., it will not show up in argument lists). however, be aware that a root user on your system could potentially intercept the password. 🚨
okay so real talk on that last one: it's fairly secure, not magically secure. if root wants your password, root can get your password. that's the caveat, don't skip it. πŸ’€
  • -v, --verbose β€” include error messages from ssh with the -i and -e options. yes, exactly those options, character for character. πŸŽ€

✨ TIPS ✨

the ssh_config file can include an arbitrary number of Host sections. each host entry specifies ssh options which apply only to the given host. Host definitions can even behave like aliases if the HostName option is included. this ssh feature, in combination with parallel-ssh host files, provides a tremendous amount of flexibility. it's giving ✨build system✨, it's giving ✨infrastructure✨, it's giving you're gonna love it actually. πŸ¦‹

internally uses the pkill command and sends signal 9 (the unblockable KILL signal). πŸ”₯

signal 9 is the one you can't catch, can't block, can't ignore. that's why the program is called nuke. no cap. ☒️

✨ EXIT STATUS ✨

the exit status codes from parallel-nuke are as follows:

  1. 0 β€” Success βœ…
  2. 1 β€” Miscellaneous error πŸŒ€
  3. 2 β€” Syntax or usage error πŸ™ˆ
  4. 3 β€” At least one process was killed by a signal or timed out. πŸ’€
  5. 4 β€” All processes completed, but at least one ssh process reported an error (exit status 255). 😭
  6. 5 β€” There were no ssh errors, but at least one remote command had a non-zero exit status. πŸ‘€

✨ AUTHORS ✨

written by Brent N. Chun <bnc@theether.org> and Andrew McNabb <amcnabb@mcnabbs.org>. absolute icons, both of them. πŸ‘‘

https://github.com/lilydjwg/parallel-ssh


✨ SEE ALSO ✨


and that's the whole page, bestie!! πŸ’– this one comes to you from the General Commands Manual and it's dated January 24, 2012, so yes, she's an elder but she still ate. go forth, pkill responsibly, and remember: signal 9 does not do negotiations. periodt. πŸŽ€βœ¨πŸ’…

πŸ“¦ where this page comes from