curl http網絡診斷

#! /bin/bash
i=0
while [ $i -lt $1 ];
do
 echo $i
 curl -X POST -w '@curl-format.txt' -m 30  'http://www.xx.com
 i=$((i+1))
donebash

curl-format.txtapp

 time_namelookup:  %{time_namelookup}\n
       time_connect:  %{time_connect}\n
    time_appconnect:  %{time_appconnect}\n
   time_pretransfer:  %{time_pretransfer}\n
      time_redirect:  %{time_redirect}\n
 time_starttransfer:  %{time_starttransfer}\n
                    ----------\n
         time_total:  %{time_total}\ncurl

相關文章
相關標籤/搜索