PEXEC(1)

πŸ“¦
version 1.0~rc8 Β· 4 versions
, in ubuntu jammy, ubuntu noble

πŸ’… pexec β€” executing commands in parallel ✨

okay bestie, welcome to pexec(1) β€” the user command that lets you run stuff in parallel, no cap 🫢


🌸 SYNOPSIS

pexec [options] [-c|-m] [--] command [arguments] | 'compound command'

✨ DESCRIPTION

So basically: pexec runs your commands or shell scripts in parallel β€” either all on one single host, or spread out across remote hosts by way of a remote shell. That's the whole vibe. Parallel girlbossing. πŸ‘‘


πŸŽ€ OPTIONS

General options

  • -h, --help β€” gives you the general summary about the command line options. lil snack, not the whole meal.
  • --long-help β€” gives a detailed list of command line options. the full feast, we love a thorough queen πŸ’–
  • --version β€” gives some version information about the program.
  • -s, --shell <shell> β€” the full path (like /bin/sh) of the shell or interpreter that's gonna be used for script execution.
  • -c, --shell-command β€” use the specified shell to interpret the command(s) instead of doing direct execution.
  • -m, --multiple-command β€” lets multiple individual shell command scripts be executed in parallel with the variation of the parameters.
  • -e, --environment <variable> β€” name of an environmental variable that gets set to the respective parameter before each execution.
  • -n, --number <number> β€” the maximal number of processes running simultaneously. plot twist: <number> can even be a complex specification of remote hosts (peep the documentation for more deets).
  • -C, --control <port> β€” the control port of a hypervisor daemon (that's either the full path of a UNIX socket or an INET host specification).
  • -p, --list <list> β€” the single-argument form of the main parameter list.
  • -r, --parameters <list> β€” the multiple-argument form of the main parameter list.
  • -f, --listfile <file> β€” the main parameter list file.
  • -w, --column <index> β€” the column index telling pexec where the parameters should be taken from if they're read from a parameter file.
  • -t, --complete β€” treats the whole line as a single parameter when the parameters are read from a file.
  • -z, --nice β€” sets the scheduling priority of pexec and all its children (the executed processes) to the priority defined by this nice value.
  • -- β€” a marker, and after it the command to execute begins. like a little velvet rope πŸŽ€

Redirecting standard input, output and error

  • -i, --input <input> β€” the (optionally formatted) name of the input file used for redirecting the standard input.
  • -o, --output <output> β€” the (optionally formatted) name of the output file used for redirecting the standard output.
  • -u, --error <output> β€” the (optionally formatted) name of the output error file, used for redirecting the standard error.
  • -R, --normal-redirection β€” equivalent to specifying --output -, --error - and --input /dev/null. one flag, three jobs, multitasking icon ✨
  • -a, --output-format <format> β€” the format of the final standard output redirection, for when the output of all the processes gets gathered into the same file.
  • -b, --error-format <format> β€” the same final redirection format, but for the standard error.
  • -x, --omit-newlines β€” disables the automatic newlines after the output and error formats.

Execution using remote hosts

  • -g, --remote-shell <remote_shell> β€” the name or full path of the remote shell used to build the tunnel between the local and the peer host(s). Default: /usr/bin/ssh.
  • -P, --pexec <pexec> β€” the full path of the pexec program on the remote hosts. if you skip this one, pexec tries to figure it out from the invoking syntax and/or the current path. she's resourceful like that 🧚
  • -T, --tunnel β€” internal use only (pexec will start up in tunnel daemon mode). don't touch, that's her private business πŸ™ˆ

Remote control, mutual exclusions and atomic command execution

  • -y, --bind <port> β€” this option lets pexec be remote controlled via INET or UNIX domain sockets.
  • -E, --pexec-connection-variable <env> β€” overrides the default environment name PEXEC_REMOTE_PORT to the value you specify, which is used by the -p|--connect auto combination to determine the control socket with which the running pexec instance can be controlled.
  • -j, --remote β€” used to remote control and/or poll the status of other running instances of pexec.
  • -p, --connect <port> β€” remote control port to connect to.
  • -t, --status β€” prints the actual status of the running jobs in a human-readable form.
  • -l, --lock <mutex> β€” locks the specified mutex. if the mutex is not locked by someone else, great; otherwise it will block until the mutex is released. sit tight bestie 😭
  • -u, --unlock <mutex> β€” unlocks the specified mutex.
  • -m, --mutex <mutex> β€” name of the mutex.
  • -d, --dump <filename> β€” dumps the content of the given file to standard output; if -m|--mutex is given, this will be atomic.
  • -s, --save <filename> β€” saves the content of standard input to the given file; if -m|--mutex is given, this will be atomic.
  • -a, --atomic <command> β€” executes the given command. if -m|--mutex is given, the execution is going to be atomic with respect to that mutex.

Hypervisor mode

  • -H, --hypervisor β€” starts pexec in hypervisor mode.
  • -C, --control <port> β€” the control port used by the hypervisor.
  • -l, --load <window> β€” use load also to limit the number of simultaneous processes, with the specified load average interval (0, 1 or 2, or 1min, 5min or 15min, respectively).
  • -f, --fifo β€” first in first out queue processing.
  • -s, --lifo β€” last in first out (stack) queue processing. this one's the default πŸ’…

Logging

  • -L, --log <file> β€” the name of the log file.
  • -W, --log-level <level> β€” the logging level.
  • -V, --verbose β€” increases the log level by one.

πŸ¦‹ REPORTING BUGS

Found a bug? Report it to <apal@szofi.elte.hu> β€” she wants to know, fr fr. πŸ›


Copyright Β© 2007, 2008-2009; Pal, Andras <apal@szofi.elte.hu>

This is free software. You may redistribute copies of it under the terms of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the extent permitted by law.

no warranty bestie, we said what we said πŸ’€

This software was written by Andras Pal. The core part was written while working for the Hungarian-made Automated Telescope (HAT) project to make the data processing more easier and therefore find many-many extrasolar planets. See more information about this project: http://hatnet.hu. Another internal libraries (e.g. numhash.[ch]) were primarily written for other projects. 🌈


🌟 SEE ALSO

The full documentation for pexec is maintained as a Texinfo manual. If the info and pexec programs are properly installed at your site, the command

info pexec

should give you access to the complete manual.


and that's the whole page, periodt πŸ’– this was pexec 1.0rc8 (2009.07.02), dated July 2018 β€” mwah, iconic, go run something in parallel 🫢✨

πŸ“¦ where this page comes from