查看請求時間信息
參考: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:~]$