Skip to content

Commit

Permalink
Stash commit
Browse files Browse the repository at this point in the history
  • Loading branch information
axelniklasson committed May 10, 2019
1 parent d73cbce commit ec1807d
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 2 deletions.
2 changes: 1 addition & 1 deletion 18_experiment_ss_overhead.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash

./run_clients_distributed.sh ../odin/hosts.txt 3 6 11 NO_OP
./run_clients_distributed.sh ../odin/hosts.txt 2 9 8 NO_OP
2 changes: 1 addition & 1 deletion experiment_ss_overhead.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ if [ "$#" -ne 1 ]; then
exit 1
fi

./run_clients_distributed.sh ../odin/hosts.txt $1 6 34 NO_OP
./run_clients_distributed.sh ../odin/hosts.txt $1 6 34 APPEND
8 changes: 8 additions & 0 deletions experiment_ss_overhead_aws.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

if [ "$#" -ne 1 ]; then
echo "Run as ./experiment_ss_overhead [scale_factor]"
exit 1
fi

./run_clients_distributed_aws.sh ../odin/hosts.txt $1 6 34 NO_OP
1 change: 1 addition & 0 deletions run_clients_distributed.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ do
ID=$(echo $line | tr ',' ' ' | awk '{print $1}')
HOST=$(echo $line | tr ',' ' ' | awk '{print $2}')
CMD="cd /practicalbft/BFTList-client && source ./env/bin/activate && HOSTS_PATH=/practicalbft/BFTList/conf/hosts.txt python client/client.py $ID $3 $4 $2 $5"
echo $CMD
echo "Launcher ==> Launching client on ${HOST}"
ssh -o StrictHostKeyChecking=no -l ${SLICE:-$DEF_SLICE} -i ${SSH_KEY:-$DEF_SSH_KEY} ${HOST} ${CMD} &> /dev/null &
pids[${ID}]=$!
Expand Down
25 changes: 25 additions & 0 deletions run_clients_distributed_aws.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
# NOTE that nbr_of_clients must be a multiple of the number of nodes

if [ "$#" -ne 5 ]; then
echo "Run as SLICE=slice_name SSH_KEY=abs_path_to_ssh_key ./run_clients [abs_path_to_hosts_file] [scale_factor] [nbr_of_clients] [reqs_per_client] [operation]"
exit 1
fi

DEF_SLICE=ec2-user
DEF_SSH_KEY=~/.ssh/aws_bftlist.pem

echo "Launcher ==> Launching clients on AWS nodes"
declare -a pids
cat $1 | awk "NR % $2 == 0" | tr ',' ' ' | awk '{print $1","$2}' | while read line
do
ID=$(echo $line | tr ',' ' ' | awk '{print $1}')
HOST=$(echo $line | tr ',' ' ' | awk '{print $2}')
CMD="cd /practicalbft/BFTList-client && source ./env/bin/activate && HOSTS_PATH=/practicalbft/BFTList/conf/hosts.txt python client/client.py $ID $3 $4 $2 $5"
echo $CMD
echo "Launcher ==> Launching client on ${HOST}"
ssh -o StrictHostKeyChecking=no -l ${SLICE:-$DEF_SLICE} -i ${SSH_KEY:-$DEF_SSH_KEY} ${HOST} ${CMD} &> /dev/null &
# ssh -o StrictHostKeyChecking=no -l ${SLICE:-$DEF_SLICE} -i ${SSH_KEY:-$DEF_SSH_KEY} ${HOST} ${CMD}
pids[${ID}]=$!
done
echo "Launcher ==> Clients launched on PlanetLab nodes!"

0 comments on commit ec1807d

Please sign in to comment.