4 DSTM_CONFDIR=${HOME}/research/Robust/src
9 TOPDIR=${HOME}/research/Robust/src/Prefetch
11 function killclients {
13 while [ $i -le $1 ]; do
14 ssh dc-${i}.calit2.uci.edu 'killall Client.bin;'
21 echo "Running java version"
23 BM_DIR=${BM_NAME}/${JAVA_DIR}
24 while [ $j -le $ITERATIONS ]; do
25 echo "Running on $1 machines ... "
28 suffix=$SERVER_ARGS | tr -d ' '
29 echo "Running Server ... "
30 /usr/bin/time -f "%e" ./Server.bin -N $1 $SERVER_ARGS 2>> ${LOGDIR}/server_${1}_${BM_NAME}_java.out &
33 echo ${BASEDIR}/${BM_DIR} > ~/.tmpdir
34 perl -x${TOPDIR} ${TOPDIR}/switch/fetch_stat.pl clear_stats settings=switch/clearsettings.txt
35 while [ $k -le $1 ]; do
36 echo "SSH into dc-${k}"
38 echo "SEED='$SEED'" > ~/.seed
41 ssh dc-${k}.calit2.uci.edu 'cd `cat ~/.tmpdir`; source ~/.bmargs; ./Client.bin $CLIENT_ARGS -seed `hostname | cut -f2 -d"-" | cut -f1 -d"."`'
43 ssh dc-${k}.calit2.uci.edu 'cd `cat ~/.tmpdir`; source ~/.bmargs; ./Client.bin $CLIENT_ARGS -seed `hostname | cut -f2 -d"-" | cut -f1 -d"."`' &
49 perl -x${TOPDIR} ${TOPDIR}/switch/fetch_stat.pl settings=switch/settings.txt
50 cat ${LOGDIR}/tmp >> ${LOGDIR}/${BM_NAME}_${1}Thrd.txt
51 if [ $i -eq 0 ];then echo "<h3> Benchmark=${BM_NAME} Thread=${1}</h3><br>" > ${LOGDIR}/${BM_NAME}_${1}Thrd_a.html ;fi
52 cat ${LOGDIR}/tmp >> ${LOGDIR}/${BM_NAME}_${1}Thrd_a.html
53 echo "<a href=\"${BM_NAME}_${1}Thrd_${j}.html\">Network Stats</a><br>" >> ${LOGDIR}/${BM_NAME}_${1}Thrd_a.html
54 mv ${TOPDIR}/html/dell.html ${LOGDIR}/${BM_NAME}_${1}Thrd_${j}.html
63 echo "Running jvm version"
65 BM_DIR=${BM_NAME}/${JVM_DIR}
66 while [ $j -le $ITERATIONS ]; do
67 echo "Running on $1 machines ... "
70 suffix=$SERVER_ARGS | tr -d ' '
71 echo "Running Server ... "
72 /usr/bin/time -f "%e" java $JVM_SERVER_CLASS -N $1 $SERVER_ARGS 2>> ${LOGDIR}/server_${1}_${BM_NAME}_jvm.out &
75 echo ${BASEDIR}/${BM_DIR} > ~/.tmpdir
76 while [ $k -le $1 ]; do
77 echo "SSH into dc-${k}"
81 ssh dc-${k}.calit2.uci.edu 'cd `cat ~/.tmpdir`; source ~/.bmargs; java $JVM_CLIENT_CLASS $CLIENT_ARGS -seed $seed'
83 ssh dc-${k}.calit2.uci.edu 'cd `cat ~/.tmpdir`; source ~/.bmargs; java $JVM_CLIENT_CLASS $CLIENT_ARGS -seed $seed' &
94 for file in `ls ${LOGDIR}/*.out`
97 cat $file | awk '{sum += $1} END {print " "sum/NR}'
104 BM_NAME=`echo $line | cut -f1 -d":"`
105 SERVER_ARGS=`echo $line | cut -f2 -d":"`
106 CLIENT_ARGS=`echo $line | cut -f3 -d":"`
107 JVM_SERVER_CLASS=`echo $line | cut -f4 -d":"`
108 JVM_CLIENT_CLASS=`echo $line | cut -f5 -d":"`
110 # Setup for remote machine
112 echo "BM_NAME='$BM_NAME'" > ~/.bmargs
113 echo "SERVER_ARGS='$SERVER_ARGS'" >> ~/.bmargs
114 echo "CLIENT_ARGS='$CLIENT_ARGS'" >> ~/.bmargs
115 echo "JVM_SERVER_CLASS='$JVM_SERVER_CLASS'" >> ~/.bmargs
116 echo "JVM_CLIENT_CLASS='$JVM_CLIENT_CLASS'" >> ~/.bmargs
118 runjava $NUM_MACHINES
119 #runjvm $NUM_MACHINES
125 echo "------- Calculating Averages -------- "