-
Notifications
You must be signed in to change notification settings - Fork 0
/
dcell-exp2.sh
58 lines (42 loc) · 982 Bytes
/
dcell-exp2.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
# Exit on any failure
set -e
# Check for uninitialized variables
set -o nounset
ctrlc() {
killall -9 python
mn -c
exit
}
trap ctrlc SIGINT
start=`date`
exptid=`date +%b%d-%H:%M`
treerootdir=Tree-$exptid
#treerootdir='Tree-Jun04-06:45'
dcellrootdir=DCell-Exp2-$exptid
#dcellrootdir='DCell-Exp2-Jun04-06:45'
combinedresultsdir=plotresults-$exptid
mkdir $combinedresultsdir
bw=1
dir1=$dcellrootdir/data
python DCell.py --bw $bw\
--dir $dir1\
-t 500\
-n 2
echo "Please terminate the controller using Cotrrol-D, then press Return..."
read c
dir2=$treerootdir/data
python Tree.py --bw $bw\
--dir $dir2\
-t 1000\
python util/plot_rate_ag_both.py --rx \
--maxy $bw \
--xlabel 'Time (s)' \
--ylabel 'Rate (Mbps)' \
-i 's.*-eth0' \
-f $dir2/bwm.txt \
-d $dir1/bwm.txt \
-o $combinedresultsdir/rate_ag.png
echo "Started at" $start
echo "Ended at" `date`
echo "Output saved to $combinedresultsdir"