strace -o /tmp/out -f perl -e 'print `ssh localhost -tt -l root tcpdump -c10 -nntttt`' #### use strict; use warnings; use threads; use threads::shared; my @threads; my @servers = (('localhost') x 100); my $lock:shared; foreach my $server (@servers) { chomp $server; push (@threads, threads->create (\&dumpServer, $server)); } foreach (@threads) { $_->join(); } sub dumpServer { my $server = shift; my $net = `ssh -l root -tt $server '/usr/sbin/tcpdump -c10 -nntttt 2>&1'