20210308 Iperf
課堂資料
課堂練習
安裝 pip
安裝 ppa
add-apt-repository ppa:deadsnakes/ppa
Update packeges
apt-get updateapt-get upgrade
升級 python 2.x 到 python 3.x
apt-get install python3.6apt-get install python3.6-gdbm

apt-get install python3.7apt-get install python3.7-gdbm

apt install ansible
python -Vpython3 -V
安裝 pip
apt-get install python3-pippip3 install --upgrade pip
設定優先順序
update-alternatives --install / usr / bin / python3 python3 /usr/bin/python3.6 1update-alternatives --install / usr / bin / python3 python3 /usr/bin/python3.7 2
到 pip document 官方網站建議的載點下載 pip 安裝檔
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
啟動剛剛下載好的 get-pip.py 檔案
python3 get-pip.py
查看 pip 目前版本
python3 -m pip -V
額外補充

cd ..cd mininetIperf
mnnetxterm h1 h2pingall
iperf -s -i 1
iperf -s -i 1 -u
iperf -s -i 1 -u -p 6666-p:port

xterm h1 h2 s1iperf -s -i 1 -u -p 5555
exitxterm h1 h2iperf -s -i 1 -u -p 5555 > udp5555^Ccat udp5555
cat udp5555 | grep sec
cat udp5555 | grep sec | grep -y 0.0-15 
cat udp5555 | grep sec | head -n 14 > result.txt

cd mininetmnxterm h1 h2xterm s1
h1 ifconfig
h1 ping 10.0.0.2 -c 3
ping 10.0.0.2python -m SimpleHTTPServer 80

sh ls /tmppingall
Gnuplot
apt install gnuplot
exitgnuplotplot "result.txt"set yrange [0:110]set ytics 0,10,110replotset xrange [0:15]set xtics 0,5,15plot "result.txt" with linespointsset xtics 0,1,15replotset xlabel "tine (sec)"set ylabel "throughput (Mbis/sec)"replotset title "udp throughput"replotset terminal "gif"type set to 'gif'set output "result.gif"replotexitLast updated
Was this helpful?

















