I'm putting this out because I suspect there are more ways to accomplish this.
I stumbled onto 'parafly' on freshports. The premise - to run a list of commands in parallel - looked very useful.
sysutils/parafly/
There is no man page but typing 'ParaFly' (note the caps) will offer terse help text. ParaFly needs a file for input. I'll use ping(8) as an example but any command is fair game.
The output is exactly as you expect. What other utility executes commands in parallel from a text file? BSD make(1) (aka 'pmake') comes to mind. The same thing as a makefile (not visible but the requisite tabs are there, I promise):
Typing 'make' will run the tasks one-at-a-time. make(1) needs '-j' to allow multiple jobs.
This gives similar output. The 'pings' all run in parallel. A poor man's nmap if you will.
What other ways can parallel tasks be done - preferably out-of-the-box?
I stumbled onto 'parafly' on freshports. The premise - to run a list of commands in parallel - looked very useful.
sysutils/parafly/
# pkg install parafly
There is no man page but typing 'ParaFly' (note the caps) will offer terse help text. ParaFly needs a file for input. I'll use ping(8) as an example but any command is fair game.
Code:
ping host1
ping host2
ping host3
ping host4
ping host5
# ParaFly -c task.txt -CPU 5
The output is exactly as you expect. What other utility executes commands in parallel from a text file? BSD make(1) (aka 'pmake') comes to mind. The same thing as a makefile (not visible but the requisite tabs are there, I promise):
Code:
# Makefile
all: t1 t2 t3 t4 t5
t1:
ping host1
t2:
ping host2
t3:
ping host3
t4:
ping host4
t5:
ping host5
Typing 'make' will run the tasks one-at-a-time. make(1) needs '-j' to allow multiple jobs.
# make -j 5
This gives similar output. The 'pings' all run in parallel. A poor man's nmap if you will.
What other ways can parallel tasks be done - preferably out-of-the-box?