#!/bin/bash

ip=(
119.139.2.105
113.94.17.50
119.139.0.187
119.139.3.65
119.139.0.15
119.139.1.190
119.139.0.162
119.139.3.243
119.139.2.45
119.139.3.59
119.139.0.220
119.139.1.114
119.139.3.140
119.139.1.125
119.139.2.43
119.139.3.228
119.139.1.165
119.139.2.73
119.139.1.229
119.139.2.242
119.139.2.14
119.139.1.205
119.139.0.13
119.139.1.121
113.94.17.231
119.139.1.139
119.139.0.3
119.139.2.206
119.139.3.217
119.139.1.40
119.139.0.133
119.139.0.140
113.94.17.27
119.139.3.7
119.139.3.86
119.139.0.153
119.139.2.213
119.139.1.47
119.139.3.144
119.139.3.20
119.139.2.223
119.139.2.16
119.139.3.15
119.139.1.13
119.139.2.148
119.139.1.51
119.139.3.169
119.139.3.170
119.139.3.57
119.139.0.223
119.139.1.31
119.139.0.251
119.139.0.148
119.139.3.211
119.139.3.172
119.139.1.147
119.139.2.159
119.139.0.84
119.139.1.215
119.139.2.255
119.139.2.166
119.139.1.194
119.139.0.222
119.139.0.48
119.139.0.79
113.94.17.89
119.139.2.174
113.94.17.191
119.139.2.6
119.139.3.240
119.139.2.175
119.139.2.96
119.139.2.59
119.139.1.65
113.94.17.15
119.139.3.133
119.139.3.69
119.139.2.207
119.139.3.94
119.139.2.65
119.139.3.180
119.139.2.142
113.94.17.71
119.139.1.68
119.139.1.246
119.139.1.89
119.139.0.224
119.139.1.63
119.139.0.2
119.139.3.48
119.139.2.72
119.139.2.252
119.139.3.195
119.139.3.32
119.139.3.137
119.139.3.238
119.139.3.101
119.139.1.4
119.139.1.245
119.139.1.9
)


for ((i=0; i<${#ip[*]};i=i+1))
do
	## local upload and server download
	##
	# 1
	#echo "iperf -c ${ip[$i]} -n 1000M -t 10 -i 3"
	#iperf -c ${ip[$i]} -n 1000M -t 10 -i 3 >> test.log 2>&1
	# 2
	#echo "qperf -t 10 --use_bits_per_sec ${ip[$i]} tcp_bw"
	#qperf -t 10 --use_bits_per_sec ${ip[$i]} tcp_bw

	## local download and server upload
	##
	#echo "ab -s 2 -c 2 -n 2 http://${ip[$i]}:49159/openfog_data_probe/file-100.mb"
	#ab -s 2 -c 2 -n 2 http://${ip[$i]}:49159/openfog_data_probe/file-100.mb

	## laterrn and 
	#echo "qperf -t 10 --use_bits_per_sec ${ip[$i]} tcp_lat tcp_bw"
	#qperf -t 10 --use_bits_per_sec ${ip[$i]} tcp_lat tcp_bw

	## drop package rate
	##
	echo "mtr -r -c 10 ${ip[$i]}"
	mtr -r -c 10 ${ip[$i]}

	## others
	##
	#./wrk -t 10 --latency -c 100 -d 10 http://${ip[$i]}:49159/openfog_data_probe/file-100.mb > $i.txt 2>&1
	#wget --timeout=2 http://${ip[$i]}:49159/openfog_data_probe/file-1.mb -o $i.txt
done












