prun - Sample Output

This tool is a Perl script that runs commands in parallel. A process choke is available to control the number of processes created. Output is serialized, to make for readable output.
% cat in
sleep 5; echo 5					 # 'sleep 5' process we track below
sleep 6; echo 6
sleep 7; echo seven
sleep 8; echo 8
sleep 9; echo 9
sleep 10; echo 10
sleep 11; echo 11
sleep 12; echo 12
sleep 13; echo 13
sleep 14; echo 14

% prun -M 7 < in
9 commands, batching 7 at a time
RUN  29356, 0 busy, 9 to go: sleep 5; echo 5	# process started
RUN  29358, 1 busy, 8 to go: sleep 6; echo 6
RUN  29360, 2 busy, 7 to go: sleep 7; echo seven
RUN  29362, 3 busy, 6 to go: sleep 8; echo 8
RUN  29364, 4 busy, 5 to go: sleep 9; echo 9
RUN  29366, 5 busy, 4 to go: sleep 10; echo 10
RUN  29368, 6 busy, 3 to go: sleep 11; echo 11
DONE 29356, 6 busy, 2 to go: sleep 5; echo 5	# process finished
--- sleep 5; echo 5				# output log
5
RUN  29370, 6 busy, 2 to go: sleep 12; echo 12
DONE 29358, 6 busy, 1 to go: sleep 6; echo 6
--- sleep 6; echo 6
6
RUN  29372, 6 busy, 1 to go: sleep 13; echo 13
DONE 29360, 6 busy, 0 to go: sleep 7; echo seven
--- sleep 7; echo seven
seven
RUN  29374, 6 busy, 0 to go: sleep 14; echo 14
DONE 29362, 6 busy, 0 to go: sleep 8; echo 8
--- sleep 8; echo 8
8
DONE 29364, 5 busy, 0 to go: sleep 9; echo 9
--- sleep 9; echo 9
9
DONE 29366, 4 busy, 0 to go: sleep 10; echo 10
--- sleep 10; echo 10
10
DONE 29368, 3 busy, 0 to go: sleep 11; echo 11
--- sleep 11; echo 11
11
DONE 29370, 2 busy, 0 to go: sleep 12; echo 12
--- sleep 12; echo 12
12
DONE 29372, 1 busy, 0 to go: sleep 13; echo 13
--- sleep 13; echo 13
13
DONE 29374, 0 busy, 0 to go: sleep 14; echo 14
--- sleep 14; echo 14
14

% prun -q -M 7 < in			# run again, in quiet mode
--- sleep 5; echo 5
5
--- sleep 6; echo 6
6
--- sleep 7; echo seven
seven
--- sleep 8; echo 8
8
--- sleep 9; echo 9
9
--- sleep 10; echo 10
10
--- sleep 11; echo 11
11
--- sleep 12; echo 12
12
--- sleep 13; echo 13
13
--- sleep 14; echo 14
14

%