curl -o /dev/null -s -w %{time_namelookup}---%{time_connect}---%{time_starttransfer}---%{time_total}---%{speed_download}"\n" https://www.baidu.com
  • -o:把curl 返回的html、js 写到垃圾回收站[ /dev/null]
  • -s:去掉所有状态
  • -w:按照后面的格式写出rt
  • time_namelookup:DNS 解析域名时间
  • time_commect:client和server端建立TCP 连接的时间
  • time_starttransfer:从client发出请求;到web的server 响应第一个字节的时间
  • time_total:client发出请求;到web的server发送会所有的相应数据的时间
  • speed_download:下周速度 单位 byte/s
posted on 2020-07-20 14:20  上善若水-随  阅读(3387)  评论(0编辑  收藏  举报