http_load通过并发访问来测试web服务器的吞吐量。由于它只在一个进程里面运行,因此不会让客户端机器卡住。而且还可以通过配置来访问HTTPS地址。
$ git clone https://github.com/AbdallahCoptan/HTTP_LOAD.git
$ cd HTTP_LOAD
$ make
$ sudo make install
验证安装是否成功:
$ ./http_load
安装成功则显示如下使用说明:
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.
$ vim urls
添加URL,每行一个,比如:
http://example.com/
http://www.httpbin.org/
$ ./http_load -rate 5 -seconds 10 urls
43 fetches, 9 max parallel, 187400 bytes, in 10.0022 seconds
4358.14 mean bytes/connection
4.29904 fetches/sec, 18735.8 bytes/sec
msecs/connect: 472.398 mean, 2214.66 max, 160.425 min
msecs/first-response: 314.888 mean, 2030.01 max, 159.584 min
HTTP response codes:
code 200 -- 43
结果说明: