root@ubuntu:~ # ab -h Usage: ab [options] [http[s]: //]hostname[:port]/path Options are: -n requests Number of requests to perform //要执行的请求数 -c concurrency Number of multiple requests to make at a time //并发数 -t timelimit Seconds to max. to spend on benchmarking // This implies -n 50000 -s timeout Seconds to max. wait for each response //超时,默认每个response 30s Default is 30 seconds -b windowsize Size of TCP send/receive buffer, in bytes //TCP发送/接收缓冲区的大小,以字节为单位 -B address Address to bind to when making outgoing connections //Address to bind to when making outgoing connections -p postfile File containing data to POST. Remember also to set -T //包含POST数据的文件。 -u putfile File containing data to PUT. Remember also to set -T //包含PUT的文件 -T content-type Content-type header to use for POST/PUT data, eg. // 文本类型 'application/x-www-form-urlencoded' Default is 'text/plain' -v verbosity How much troubleshooting info to print //日志级别 -w Print out results in HTML tables //在HTML表格中打印结果 -i Use HEAD instead of GET //使用HEAD而不是GET -x attributes String to insert as table attributes //作为表属性插入的字符串 -y attributes String to insert as tr attributes //作为tr属性插入的字符串 -z attributes String to insert as td or th attributes //作为td或th属性插入的字符串 -C attribute Add cookie, eg. 'Apache=1234' . (repeatable) //添加cookie -H attribute Add Arbitrary header line, eg. 'Accept-Encoding: gzip' //添加header Inserted after all normal header lines. (repeatable) -A attribute Add Basic WWW Authentication, the attributes //添加基本WWW身份验证 are a colon separated username and password. -P attribute Add Basic Proxy Authentication, the attributes // 添加基本代理验证 are a colon separated username and password. -X proxy:port Proxyserver and port number to use // 要使用的Proxyserver和端口号 -V Print version number and exit //版本号 -k Use HTTP KeepAlive feature //使用长连接 -d Do not show percentiles served table. // 不展示百分比 -S Do not show confidence estimators and warnings. //不展示警告 -q Do not show progress when doing more than 150 requests //执行超过150个请求时不要显示进度 -l Accept variable document length (use this for dynamic pages) //接受可变文档长度(用于动态页面) -g filename Output collected data to gnuplot format file. //将收集的数据输出到gnuplot格式文件 -e filename Output CSV file with percentages served //输出已提供百分比的CSV文件 -r Don't exit on socket receive errors. -m method Method name // 方法名称 -h Display usage information ( this message) //显示使用信息 -Z ciphersuite Specify SSL/TLS cipher suite (See openssl ciphers) -f protocol Specify SSL/TLS protocol (TLS1, TLS1.1, TLS1.2 or ALL) |