linux修改响应时间,linux下使用httping测试web响应时间
安裝httping
yum -y install httping
然后使用:
httping -options
-g url
-h hostname
-p port
-x host:port(如果是測squid,用-x,不要用-h;和curl的不一樣,curl -H指定的是發送的hostname,這個-h是指定給DNS解析的hostname)
-c count
-t timeout
-s statuscode
-S 將時間分開成連接和傳輸兩部分顯示
-G GET(默認是HEAD)
-b 在使用了GET的前提下顯示傳輸速度KB/s
-B 同-b,不過使用了壓縮
-I useragent
-R referer
-C cookie=*
-l SSL
-U username
-P password
-n a,b 提供給nagios監控用的,當平均響應時間>=a時,返回1;>=b,返回2;默認為0
-N c 提供給nagios監控用的,一切正常返回0,否則只要有失敗的就返回c
舉例如下:
[[email?protected] ~]# httping -g http://www.baidu.com -SGbs -c 10
PING www.baidu.com:80 (/):
connected to 220.181.112.244:80 (593 bytes), seq=0 time=375.32+ ?5.69+ ?6.21+ 19.39+ ?0.01=406.62 ms 200 OK 4079KB/s
connected to 220.181.111.188:80 (593 bytes), seq=1 time=385.49+ ?5.55+ ?6.31+ 23.69+ ?0.01=421.05 ms 200 OK 3316KB/s
connected to 220.181.112.244:80 (593 bytes), seq=2 time=368.88+ ?5.37+ ?5.68+ 13.65+ ?0.01=393.58 ms 200 OK 5987KB/s
connected to 220.181.111.188:80 (593 bytes), seq=3 time=371.23+ ?5.22+ ?5.67+ 24.77+ ?0.01=406.88 ms 200 OK 3106KB/s
connected to 220.181.111.188:80 (593 bytes), seq=4 time=378.27+ ?5.29+ ?5.68+ 14.14+ ?0.01=403.38 ms 200 OK 6408KB/s
connected to 220.181.112.244:80 (593 bytes), seq=5 time=381.77+ ?5.17+ ?5.69+ 18.68+ ?0.01=411.32 ms 200 OK 4208KB/s
connected to 220.181.111.188:80 (593 bytes), seq=6 time=386.37+ ?5.08+ ?5.71+ 21.32+ ?0.02=418.48 ms 200 OK 4110KB/s
connected to 220.181.111.188:80 (593 bytes), seq=7 time=389.38+ ?5.52+ ?5.57+ 18.96+ ?0.01=419.44 ms 200 OK 4217KB/s
connected to 220.181.111.188:80 (593 bytes), seq=8 time=403.63+ ?5.29+ ?5.64+ 24.81+ ?0.01=439.37 ms 200 OK 3271KB/s
connected to 220.181.112.244:80 (593 bytes), seq=9 time=389.84+ ?5.21+ ?5.65+ 19.77+ ?0.01=420.46 ms 200 OK 4597KB/s
--- http://www.baidu.com/ ping statistics ---
10 connects, 10 ok, 0.00% failed, time 14142ms
round-trip min/avg/max = 393.6/414.1/439.4 ms
Transfer speed: min/avg/max = 3106.659816/4330.607617/6408.417735 KB
原文:http://304076020.blog.51cto.com/7503470/1562511
總結
以上是生活随笔為你收集整理的linux修改响应时间,linux下使用httping测试web响应时间的全部內容,希望文章能夠幫你解決所遇到的問題。
                            
                        - 上一篇: linux 修改时间的命令,Linux
 - 下一篇: 显示驱动包含在Linux内核层,驱动程序