shell multiplexor
C Shell Other Makefile M4 Awk C++

README.md

The most likely way for the world to be destroyed, most experts agree, is by accident. That's where we come in. We're computer professionals. We cause accidents.

What is shmux?

shmux is program for executing the same command on many hosts in parallel. For each target, a child process is spawned by shmux, and a shell on the target obtained one of the supported methods: rsh, ssh, or sh. The output produced by the children is received by shmux and either (optionally) output in turn to the user using an easy to read format, or written to files for later processing making it well suited for use in scripts.

For more details, check out the shmux(1) manual page. The example shown below is also a good illustration of some of shmux's capabilities and is dissected frame by frame for your convenience.

Sample shmux output

Features

shmux solves a fairly simple problem that can be addressed with a few lines of shell or Perl. This may lead you to think that using shmux is total overkill, but shmux is a powerful tool that offers many time and life saving features, so read on!

  • When used in a script
    • Ability to define what is and what is not an error for the command being run (based on exit code and output content)
    • Output and exit codes are saved into files to facilitate use from a script.
  • When used interactively (directly on the command line, or from within a script/wrapper):
    • Well formatted output
    • Standard error output displayed in bold
    • Real-time status shown
    • Ability to pause, resume, quit cleanly
    • Automatically pause on error, allowing the user to cleanly stop before more goes wrong
    • Ability to hide output of successful targets
    • Mixed or un-mixed target outputs

Related Work

Now..

Where were all these when i wrote shmux? why do people keep reinventing the wheel?