查看请求时间信息
参考:https://blog.csdn.net/jackyzhousales/article/details/82799494
更多时间参数参考 https://www.cnblogs.com/shell-blog/p/5466905.html
示例:curl www.baidu.com -w "time_connect: %{time_connect}\ntime_starttransfer: %{time_starttransfer}\ntime_total: %{time_total}\n"
更多参数参考如下
参数 |
含义 |
|
time_namelookup |
DNS解析域名时间 |
|
time_connect |
TCP连接的时间,三次握手的时间 |
|
time_starttransfer |
从请求开始到第一个字节将要传输的时间 |
|
time_total |
总时间 |
|
speed_download |
下载速度,单位-字节每秒 |
|
time_appconnect |
SSL|SSH等上层连接建立的时间 |
|
time_pretransfer |
从请求开始到响应开始传输的时间 |
|
time_redirect |
从开始到最后一个请求事务的时间 |
指定Header配置hosts
curl -H 'Host:www.test.com' http://10.44.54.111/test.php
或 curl -x 10.44.54.111:80 http://www.test.com/test.php
Slient模式
[@localhost:~]$ curl www.baidu.com -o /tmp/bd % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 2381 100 2381 0 0 84101 0 --:--:-- --:--:-- --:--:-- 85035 [@localhost:~]$ curl -s www.baidu.com -o /tmp/bd [@localhost:~]$
显示下载进度条信息
[@localhost:~]$ curl -# www.baidu.com -o /tmp/bd ######################################################################## 100.0% [@localhost:~]$