测试方法总结

网络测试:

性能测试:

网络上行/下行/延时能力测试:

参考链接:
# 测试用ftp网站和使用说明
http://speedtest.tele2.net/
# curl命令详解
http://blog.51yip.com/linux/1049.html
https://blog.csdn.net/weixin_34199405/article/details/90157958
 
# 测试原理
下行速度:使用curl相关命令到http://speedtest.tele2.net/网站提供的http服务器地址去下载指定大小的文件,确认下行速度。
上行速度:使用curl相关命令到http://speedtest.tele2.net/网站提供的ftp服务器地址去下载指定大小的文件,确认上行速度。
时延:ping www.baidu.com
 
 
# 注意1: 测试发现,两条curl命令间隔最好控制在5s以上,这个测试网站可能有相关限制。
# 注意2: 速度的话建议使用相对较大的文件来测试,使用文件大小除以总时间来得出平均速度。
# 注意3: 如果要观察中间过程可以把-skw里的s去掉,s的意思是静默执行。
 
1.下行测试(按需选择):
 
# 1.1 只获得下行速度(不保留文件)
curl -Lo /dev/null -skw "speed_download: %{speed_download} B/s\n" http://speedtest.tele2.net/1MB.zip
 
# 1.2 只获得下行速度(保留文件)
curl -Lo ./1MB.zip -skw "speed_download: %{speed_download} B/s\n" http://speedtest.tele2.net/1MB.zip
 
# 1.3 获取连接时间、重定向时间等更多的数据
curl -Lo ./1MB.zip -skw "time_connect: %{time_connect} s\ntime_namelookup: %{time_namelookup} s\ntime_pretransfer: %{time_pretransfer} s\ntime_starttransfer: %{time_starttransfer} s\ntime_redirect: %{time_redirect} s\nspeed_download: %{speed_download} B/s\ntime_total: %{time_total} s\n\n"  http://speedtest.tele2.net/1MB.zip
 
 
2.上行测试(按需选择)(使用上一步保留的文件做上传,使用ls -lh查看并确认文件大小):
# 2.1 只获得上行速度
curl -T 1MB.zip -skw "speed_upload: %{speed_upload} B/s\n" http://speedtest.tele2.net/upload.php
# 2.2 获取连接时间、重定向时间等更多的数据
curl -T 1MB.zip -skw "time_connect: %{time_connect} s\ntime_namelookup: %{time_namelookup} s\ntime_pretransfer: %{time_pretransfer} s\ntime_starttransfer: %{time_starttransfer} s\ntime_redirect: %{time_redirect} s\nspeed_upload: %{speed_upload} B/s\ntime_total: %{time_total} s\n\n" http://speedtest.tele2.net/upload.php

3. 时延测试:
ping www.baidu.com
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值