forked from PlatformLab/ramcloud-ycsb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfillCM.sh
executable file
·41 lines (37 loc) · 867 Bytes
/
fillCM.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
#
# This shell script uses YCSB benchmark A to load the database for YCSB.
if [ $# -ne 4 ]; then
echo "Usage: fill.sh wd coordLocator logDir clientIds"
exit 1
fi
WD=$1
COORD=$2
LOG_DIR=$3
CLIENTS=$4
SSH_CRED="/home/admin/.ssh/jigar_cloud_admin"
LOGS=""
START="0"
for CLIENT in $CLIENTS; do LAST_CLIENT=$CLIENT; done
for CLIENT in $CLIENTS; do
LOG=$LOG_DIR/fill-ramcloud$CLIENT.log
LOGS="$LOGS $LOG"
if (($CLIENT == $LAST_CLIENT)); then
ssh -i $SSH_CRED admin@ramcloud$CLIENT \
$WD/rc-ycsbCM.sh workloada \
1000000 \
$COORD \
$START \
1000000 > $LOG 2>&1
else
ssh -i $SSH_CRED admin@ramcloud$CLIENT \
$WD/rc-ycsbCM.sh workloada \
1000000 \
$COORD \
$START \
1000000 > $LOG 2>&1 &
fi
((START=START+1000000))
sleep .01
done
./waitClients.sh $LOGS