curl命令查看请求响应时间
对于一些禁止ping 的网址可以使用curl进行测试
curl -o /dev/null -s -w %{http_code}---%{content_type}---%{time_namelookup}---%{time_namelookup}---%{time_connect}---%{time_starttransfer}---%{time_total}---%{speed_download}"\n" "http://www.baidu.com/"
-o /dev/null:把curl 返回的html、js 写到垃圾回收站[ /dev/null] -s:去掉所有状态 -w:按照后面的格式写出rt