ab是用于对Apache超文本传输协议(HTTP)服务器进行基准测试的工具。它旨在使您对当前的Apache安装方式有一个印象。这尤其向您显示Apache安装每秒能够处理多少个请求。
ab
[ -A auth-username:password ]
[ -b windowsize ]
[ -B local-address ]
[ -c concurrency ]
[ -C cookie-name=value ]
[ -d ]
[ -e csv-file ]
[ -E client-certificate file ]
[ -f protocol ]
[ -g gnuplot-file ]
[ -h ]
[ -H custom-header ]
[ -i ]
[ -k ]
[ -l ]
[ -m HTTP-method ]
[ -n requests ]
[ -p POST-file ]
[ -P proxy-auth-username:password ]
[ -q ]
[ -r ]
[ -s timeout ]
[ -S ]
[ -t timelimit ]
[ -T content-type ]
[ -u PUT-file ]
[ -v verbosity]
[ -V ]
[ -w ]
[ -x <table>-attributes ]
[ -X proxy[:port] ]
[ -y <tr>-attributes ]
[ -z <td>-attributes ]
[ -Z ciphersuite ]
[http[s]://]hostname[:port]/path
-A auth-username:password:并通过编码为base64的网络发送。无论服务器是否需要该字符串,都将发送该字符串(即,已发送所需的401身份验证)。-b windowsize-B local-address-c concurrency-C cookie-name=valueCookie:在请求中添加一行。该参数通常为一
对形式。该字段是可重复的。name=value-d-e csv-file-E client-certificate-file-f protocol-g gnuplot-file-h-H custom-header"Accept-Encoding: zip/zop;8bit")。-iHEAD请求,而不是GET。-k-l-m HTTP-method-n requests-p POST-file-T。-P proxy-auth-username:password:并通过编码为base64的网络发送。不管代理是否需要它都将发送该字符串(即,已发送所需的407代理身份验证)。-qab输出进度计数stderr。该
-q标志将禁止显示这些消息。-r-s timeout-S-t timelimit-n 50000内部。使用它在固定的总时间内对服务器进行基准测试。默认情况下没有时间限制。-T content-typeapplication/x-www-form-urlencoded。默认值为text/plain。-u PUT-file-T。-v verbosity4上方将在标题上显示信息,3上方将显示响应代码(404、200等),
2上方将显示警告和信息。-V-w-x <table>-attributes<table>。插入属性。<table here >-X proxy[:port]-y <tr>-attributes<tr>。-z <td>-attributes<td>。-Z ciphersuite以下列表描述了由返回的值ab:
concurrency * timetaken * 1000 / done
而第二个值是用公式计算的
timetaken * 1000 / donetotalread / 1024 / timetaken有各种固定长度的静态声明的缓冲区。结合命令行参数的延迟解析,服务器和其他外部输入的响应标头,这可能会给您带来麻烦。
它没有完全实现HTTP / 1.x。仅接受某些“预期”形式的回复。strstr(3)概要文件顶部的大量使用显示可能表明性能存在问题;即,您将衡量ab性能而不是服务器的性能。