-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathexp
More file actions
executable file
·66 lines (53 loc) · 2.3 KB
/
exp
File metadata and controls
executable file
·66 lines (53 loc) · 2.3 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/bash
target=c11node10
router=c11node28
ganglia=10.244.36.20
# RTT = delay*2
delay=90 # 180ms RTT
#delay=40 # 80ms RTT
#delay=10 # 20ms RTT
#delay=0 # 0.4ms RTT (LAN)
rtt=$(( delay * 2 ))ms
vwnd=6
run=2
prefix=${vwnd}vms-r${run}
#prefix=1vm-r4
turn=pong
# last minutes for ganglia metrics
#min=3min
min=5min
# download ganglia metrics
function download() {
wget -O $prefix.src.net.png "http://10.244.36.20/ganglia/graph.php?r=${min}&z=medium&c=Hadoop&h=c11node9&s=by+name&g=network_report"
wget -O $prefix.src.net.csv "http://10.244.36.20/ganglia/graph.php?r=${min}&z=medium&c=Hadoop&h=c11node9&s=by+name&g=network_report&csv=1"
wget -O $prefix.src.cpu.png "http://10.244.36.20/ganglia/graph.php?r=${min}&z=medium&c=Hadoop&h=c11node9&s=by+name&g=cpu_report"
wget -O $prefix.src.cpu.csv "http://10.244.36.20/ganglia/graph.php?r=${min}&z=medium&c=Hadoop&h=c11node9&s=by+name&g=cpu_report&csv=1"
wget -O $prefix.dest.net.png "http://10.244.36.20/ganglia/graph.php?r=${min}&z=medium&c=Hadoop&h=${target}&s=by+name&g=network_report"
wget -O $prefix.dest.net.csv "http://10.244.36.20/ganglia/graph.php?r=${min}&z=medium&c=Hadoop&h=${target}&s=by+name&g=network_report&csv=1"
wget -O $prefix.dest.cpu.png "http://10.244.36.20/ganglia/graph.php?r=${min}&z=medium&c=Hadoop&h=${target}&s=by+name&g=cpu_report"
wget -O $prefix.dest.cpu.csv "http://10.244.36.20/ganglia/graph.php?r=${min}&z=medium&c=Hadoop&h=${target}&s=by+name&g=cpu_report&csv=1"
for node in master slave1 slave2 slave3
do
for resource in cpu network
do
#for filetype in png csv
#do
wget -O $prefix.$node.$resource.png "http://${ganglia}/ganglia/graph.php?r=${min}&z=medium&c=Hadoop&h=${node}&s=by+name&g=${resource}_report"
wget -O $prefix.$node.$resource.csv "http://${ganglia}/ganglia/graph.php?r=${min}&z=medium&c=Hadoop&h=${node}&s=by+name&g=${resource}_report&csv=1"
#done
done
done
}
ssh $router service tc delay $delay
# run workload: wordcount, terasort, kmeans, fuzzy kmeans, LDA
#ssh master "cd /root/mahout; ./run" &
# [ping] c11node9 to c11node10
if [[ $turn == "ping" ]]; then
./cluster $vwnd $run $rtt
fi
# [pong] c11node10 to c11node9
if [[ $turn == "pong" ]]; then
ssh $target "cd /root/qemu/; ./cluster $vwnd $run"
download
fi
ssh $router service tc stop