Apache Benchmark

上一篇 / 下一篇  2014-07-16 15:55:06 / 个人分类:个人总结

ab - Apache HTTP server benchmarking tool

Apache自带的用于测试http server的轻量级压力测试工具。

1、语法

ab [ -A auth-username:password ] [ -c concurrency ] [ -C cookie-name=value ] [ -d ] [ -e csv-file ] [ -g gnuplot-file ] [ -h ] [ -H custom-header ] [ -i ] [ -k ] [ -n requests ] [ -p POST-file ] [ -P proxy-auth-username:password ] [ -q ] [ -s ] [ -S ] [ -t timelimit ] [ -T content-type ] [ -v verbosity] [ -V ] [ -w ] [ -x <table>-attributes ] [ -X proxy[:port] ] [ -y <tr>-attributes ] [ -z <td>-attributes ] [http://]hostname[:port]/path

注意:访问的url路径必须有/document path,如果没有,等于是直接访问的主机,而不是主机下的web应用。ie:http://www.baidu.com/而非http://www.mangocity.com

2、选项

-A auth-username:password
向服务器提供基本认证信息。用户名和密码之间由一个":"隔开,并将被以base64编码形式发送。无论服务器是否需要认证,此字符串都会被发送。

-c concurrency
一次执行的请求数量(并发数),默认一次执行一个请求。

 

 


TAG:

 

评分:0

我来说两句

Open Toolbar