Skip to content

Commit

Permalink
修复节点
Browse files Browse the repository at this point in the history
  • Loading branch information
ylws-4617 committed Jul 28, 2018
1 parent fb856ad commit 90b986d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions Generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -443,19 +443,19 @@ def dict_to_table(d,tab):
<td>{62}</td>
</tr>
<tr>
<td>西安移动</td>
<td>北京电信</td>
<td>{63}</td>
<td>{64}</td>
<td>{65}</td>
</tr>
<tr>
<td>上海移动</td>
<td>北京联通</td>
<td>{66}</td>
<td>{67}</td>
<td>{68}</td>
</tr>
<tr>
<td>成都移动</td>
<td>湖南电信</td>
<td>{69}</td>
<td>{70}</td>
<td>{71}</td>
Expand Down
16 changes: 8 additions & 8 deletions ZBench-CN.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if [ ! -e '/usr/sbin/virt-what' ]; then
else
apt-get update
apt-get -y install virt-what > /dev/null 2>&1
fi
fi
fi

# Install uuid
Expand Down Expand Up @@ -166,7 +166,7 @@ speed() {
speed_test_cn(){
if [[ $1 == '' ]]; then
temp=$(python /tmp/speedtest.py --share 2>&1)
is_down=$(echo "$temp" | grep 'Download')
is_down=$(echo "$temp" | grep 'Download')
if [[ ${is_down} ]]; then
local REDownload=$(echo "$temp" | awk -F ':' '/Download/{print $2}')
local reupload=$(echo "$temp" | awk -F ':' '/Upload/{print $2}')
Expand All @@ -179,7 +179,7 @@ speed_test_cn(){
fi
else
temp=$(python /tmp/speedtest.py --server $1 --share 2>&1)
is_down=$(echo "$temp" | grep 'Download')
is_down=$(echo "$temp" | grep 'Download')
if [[ ${is_down} ]]; then
local REDownload=$(echo "$temp" | awk -F ':' '/Download/{print $2}')
local reupload=$(echo "$temp" | awk -F ':' '/Upload/{print $2}')
Expand Down Expand Up @@ -210,10 +210,10 @@ speed_cn() {
speed_test_cn '4863' "西安电信"
speed_test_cn '5083' '上海联通'
speed_test_cn '5726' '重庆联通'
speed_test_cn '5192' "西安移动"
speed_test_cn '4665' '上海移动'
speed_test_cn '4575' '成都移动'
speed_test_cn '4751' "北京电信"
speed_test_cn '5145' '北京联通'
speed_test_cn '6132' '湖南电信'
rm -rf /tmp/speedtest.py
}
Expand Down Expand Up @@ -390,7 +390,7 @@ done
if [[ $ifreport == 'y' ]];then
echo ""
myip=`curl -m 10 -s http://members.3322.org/dyndns/getip`
echo "访问 http://${myip}:8001/index.html 查看您的测试报告,按 Ctrl + C 退出"
echo "访问 http://${myip}:8001/index.html 查看您的测试报告,按 Ctrl + C 退出"
cd /tmp/report
python -m SimpleHTTPServer 8001
iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 8001 -j ACCEPT
Expand Down
18 changes: 9 additions & 9 deletions ZBench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if [ ! -e '/usr/sbin/virt-what' ]; then
else
apt-get update > /dev/null 2>&1
apt-get -y install virt-what > /dev/null 2>&1
fi
fi
fi


Expand Down Expand Up @@ -167,7 +167,7 @@ speed() {
speed_test_cn(){
if [[ $1 == '' ]]; then
temp=$(python /tmp/speedtest.py --share 2>&1)
is_down=$(echo "$temp" | grep 'Download')
is_down=$(echo "$temp" | grep 'Download')
if [[ ${is_down} ]]; then
local REDownload=$(echo "$temp" | awk -F ':' '/Download/{print $2}')
local reupload=$(echo "$temp" | awk -F ':' '/Upload/{print $2}')
Expand All @@ -180,7 +180,7 @@ speed_test_cn(){
fi
else
temp=$(python /tmp/speedtest.py --server $1 --share 2>&1)
is_down=$(echo "$temp" | grep 'Download')
is_down=$(echo "$temp" | grep 'Download')
if [[ ${is_down} ]]; then
local REDownload=$(echo "$temp" | awk -F ':' '/Download/{print $2}')
local reupload=$(echo "$temp" | awk -F ':' '/Upload/{print $2}')
Expand All @@ -201,7 +201,7 @@ speed_test_cn(){
echo ${reupload} >> /tmp/speed_cn.txt
echo ${REDownload} >> /tmp/speed_cn.txt
echo ${relatency} >> /tmp/speed_cn.txt
}
Expand All @@ -214,10 +214,10 @@ speed_cn() {
speed_test_cn '4863' "Xi'an CU"
speed_test_cn '5083' 'Shanghai CU'
speed_test_cn '5726' 'Chongqing CU'
speed_test_cn '5192' "Xi'an CM"
speed_test_cn '4665' 'Shanghai CM'
speed_test_cn '4575' 'Chengdu CM'
speed_test_cn '5192' "Beijing CT"
speed_test_cn '4665' 'Beijing CT'
speed_test_cn '4575' 'Hunan CT'
rm -rf /tmp/speedtest.py
}
Expand Down Expand Up @@ -399,7 +399,7 @@ done
if [[ $ifreport == 'y' ]];then
echo ""
myip=`curl -m 10 -s http://members.3322.org/dyndns/getip`
echo "Visit http://${myip}:8001/index.html to see your report,Press Ctrl + C to exit."
echo "Visit http://${myip}:8001/index.html to see your report,Press Ctrl + C to exit."
cd /tmp/report
python -m SimpleHTTPServer 8001
iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 8001 -j ACCEPT
Expand Down

0 comments on commit 90b986d

Please sign in to comment.