curl 查看一个web站点的响应时间(rt)
2016-05-11 09:15
387 查看
1. curl 查看web站点rt
curl -o /dev/null -s -w %{time_namelookup}::%{time_connect}::%{time_starttransfer}::%{time_total}::%{speed_download}"\n" "http://www.taobao.com" 02.0.014::0.015::0.018::0.019::1516256.00
2. curl的参数
-o:把curl 返回的html、js 写到垃圾回收站[ /dev/null]-s:去掉所有状态
curl -o /dev/null -w %{time_namelookup}::%{time_connect}::%{time_starttransfer}::%{time_total}::%{speed_download}"\n" "http://www.taobao.com" 02. % Total % Received % Xferd Average Speed Time Time Time Current 03. Dload Upload Total Spent Left Speed 04.100 28774 0 28774 0 0 1145k 0 --:--:-- --:--:-- --:--:-- 7550k 05.0.014::0.016::0.020::0.025::1173060.000
-w:按照后面的格式写出rt
time_namelookup:DNS 解析域名[www.taobao.com]的时间
time_commect:client和server端建立TCP 连接的时间
time_starttransfer:从client发出请求;到web的server 响应第一个字节的时间
time_total:client发出请求;到web的server发送会所有的相应数据的时间
speed_download:下周速度 单位 byte/s
3. 上面时间rt的理解【单位是 秒】
0.014: DNS 服务器解析www.taobao.com 的时间单位是s
0.015: client发出请求,到c/s 建立TCP 的时间;里面包括DNS解析的时间
0.018: client发出请求;到s响应发出第一个字节开始的时间;包括前面的2个时间
0.019: client发出请求;到s把响应的数据全部发送给client;并关闭connect的时间
1516256.00 :下周数据的速度
1. 建立TCP连接到server返回client第一个字节的时间:0.018s - 0.015s = 0.003s
2. server把响应数据发送给client的时间:0.019s - 0.018 = 0.01s
相关文章推荐
- 理解php依赖注入和控制反转
- linux查看CPU性能及工作状态的指令
- centos6.5下升级python版本为python2.7
- iOS开发——九切片
- 错误信息 NSError
- 进程调度
- Linux常用命令(五)用户及用户组管理
- <linux kernel>plz do not use usleep(0)!
- OpenGL Transform feed back 粒子系统
- (1) spring mvc一段代码样式
- 每天laravel-20160804| Container -7
- C# 判断文件夹存在与否并创建文件夹
- URI和URL的区别
- hdu 1087 Super Jumping! Jumping! Jumping!
- windows自带杀毒防火墙
- Extjs4.0 ComboBox如何实现三级联动
- JENKINS搭建
- iOS网络连接优化
- Yale CAS 安装配置过程指导书
- 把手机当网卡使用