runcampaign.sh uses start-clients.sh instead of duplicating code
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1852 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
@ -7,16 +7,6 @@
|
||||
# - (possibly overridden) env variables from fail-env.sh
|
||||
#
|
||||
|
||||
set -e
|
||||
# determine absolute path of this script
|
||||
SCRIPTDIR=$(readlink -f $(dirname $0))
|
||||
# env variable defaults
|
||||
source $SCRIPTDIR/fail-env.sh
|
||||
|
||||
CMD="killall -q client.sh || true; cd $FAIL_EXPERIMENT_TARGETDIR; ./multiple-clients.sh"
|
||||
CONNECTION_ATTEMPTS=2
|
||||
SSH="ssh -o BatchMode=yes -o ConnectTimeout=60 -o ConnectionAttempts=$CONNECTION_ATTEMPTS"
|
||||
|
||||
# runcampaign.sh <campaignserver-binary>
|
||||
if [ ! -x "$1" ]; then echo "usage: $0 <campaignserver-binary>" >&2; exit 1; fi
|
||||
CAMPAIGNSERVER_BINARY=$1
|
||||
@ -25,20 +15,7 @@ date
|
||||
/usr/bin/time -po .time "$CAMPAIGNSERVER_BINARY" > $(basename "$CAMPAIGNSERVER_BINARY")_progress.txt 2>&1 &
|
||||
sleep .1 # wait until server is likely to have a listening socket opened
|
||||
|
||||
for h in $FAIL_EXPERIMENT_HOSTS
|
||||
do
|
||||
if [[ $h == *:* ]]
|
||||
then
|
||||
# split in host:nclients
|
||||
NCLIENTS=${h#*:}
|
||||
h=${h%:*}
|
||||
else
|
||||
NCLIENTS=
|
||||
fi
|
||||
|
||||
$SSH $h "$CMD $NCLIENTS" &
|
||||
disown
|
||||
done
|
||||
$(dirname $0)/start-clients.sh
|
||||
|
||||
wait
|
||||
echo "duration:"
|
||||
|
||||
Reference in New Issue
Block a user