-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmptcp.sh
executable file
·48 lines (40 loc) · 897 Bytes
/
mptcp.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
#!/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`
rootdir=mptcp-$2-$exptid
bw=10
# Note: you need to make sure you report the results
# for the correct port!
# In this example, we are assuming that each
# client is connected to port 2 on its switch.
for n in 1; do
dir=$rootdir
python $1 --bw $bw \
--dir $dir \
-t 60 \
-n $n \
-s $3
python util/plot_rate.py --rx \
--maxy $bw \
--xlabel 'Time (s)' \
--ylabel 'Rate (Mbps)' \
-i 's.*-eth2' \
-f $dir/bwm.txt \
-o $dir/rate.png
python util/plot_tcpprobe.py \
-f $dir/tcp_probe.txt \
-o $dir/cwnd.png
done
echo "Started at" $start
echo "Ended at" `date`
echo "Output saved to $rootdir"