3 ms·
make a small change: for host in ... ; do ssh -l root $host "..." & done; wait and it's very parallel. All that key exchange takes a while, so it's not rid
by philsnow 13y ago
make a small change:
for host in ... ; do ssh -l root $host "..." & done; wait
and it's very parallel. All that key exchange takes a while, so it's not ridiculously fast, but it's pretty good. If you've got ControlMaster set up already to be per-host, this might very well be very fast the second time.
- revscat 13y agoYou may want to look into using GNU parallel with that.
- derekp7 13y agoAlso check out xargs with the -P 10 -n 1 flags (for example) -- to limit at most 10 parallel tasks running at the same time. Useful if you don't have GNU parallel installed where you happen to be working (everyone has xargs installed).