网站压力测试工具 http_load

Saturday, June 12, 2010

http_load以并行复用的方式运行,用以测试web服务器的吞吐量与负载。但是它不同于大多数压力测试工具,它可以以一个单一的进程运行,一般不会把客户机搞死。还可以测试HTTPS类的网站请求。

Install

git clone git://github.com/chaoslawful/http_load.git
cd http_load
make && make install

Usage

http_load --help
usage:  http_load [-checksum] [-throttle] [-proxy host:port] [-verbose] [-timeout secs] [-sip sip_file]
            -parallel N | -rate N [-jitter]
            -fetches N | -seconds N
            url_file
One start specifier, either -parallel or -rate, is required.
One end specifier, either -fetches or -seconds, is required.



http_load -p并发访问进程数 -f总计的访问次数 -r每秒的访问频率 -s访问时间  需要访问的url文件
echo "http://192.168.1.101/" >1.txt
http_load -p 30 -s 60 1.txt
      7751 fetches, 30 max parallel, 2.9119e+08 bytes, in 60.0024 seconds
      37568 mean bytes/connection
      129.178 fetches/sec, 4.85297e+06 bytes/sec
      msecs/connect: 77.8017 mean, 3050.89 max, 30.308 min
      msecs/first-response: 50.3716 mean, 9148.3 max, 31.205 min
      HTTP response codes:code 200 -- 7751                说明打开响应页面的类型

This entry was tagged Linux and webbench

comments powered by Disqus

© 2009-2013 lxneng.com. All rights reserved. Powered by Pyramid

go to Top