--- /dev/null
+#!/bin/bash
+
+if [ ! $SERVERS ]; then
+ SERVERS="servers.txt"
+fi
+
+rm -rf harvest
+mkdir harvest
+
+for s in `cat $SERVERS`; do
+ (if ssh $s "cat ./swift/lout.gz" | gunzip | \
+ perl -ne 's/(#\d+)/'$s' $1/ && print' \
+ > harvest/$s.log ; then
+ echo $s harvest OK
+ else
+ echo $s harvest FAIL
+ fi) &
+done
+
+wait
+echo 'harvested all; sorting'
+sort -m harvest/*.log | ./swlognm | gzip > harvest/swarm.log.gz
+
+echo DONE
--- /dev/null
+#!/usr/bin/perl -w
+
+#
+# This script detects handshake patterns
+# and changes channel numbers for host names
+#
+#0_05_01_981_298 node309 #45 +hs f33dff82
+#0_05_02_039_313 lossy #16 -hs f33dff82
+my %HSSRC = ();
+my %CH = ();
+
+while (<>) {
+ / (\S+) (\#\d+)/ || next;
+ my $src = $1;
+ my $ch = $2;
+ if ( exists $CH{"$src$ch"} ){
+ s/$ch/$CH{"$src$ch"}$ch/ or die $_;
+ } elsif (/[\+\-]hs ([a-f0-9]+)$/) {
+ if ( exists $HSSRC{$1} ) {
+ $CH{"$src$ch"} = $HSSRC{$1};
+ my $srckey = $HSSRC{$1}.$HSSRCCH{$1};
+ $CH{$srckey} = $src;
+ } else {
+ $HSSRC{$1} = $src;
+ $HSSRCCH{$1} = $ch;
+ }
+ }
+ print;
+}