-attributes\fR ] [ -\fBz\fR \fI-attributes\fR ] [http://]\fIhostname\fR[:\fIport\fR]/\fIpath\fR
.SH "描述 SUMMARY"
.PP
.B ab
是一个测试你Apache http服务器的工具,你可以通过这个工具
指定一个单位时间内向apache发出的请求数量来看看你的Apache和机
器配合的性能如何
.SH "选项 OPTIONS"
.TP
-A \fIauth-username\fR:\fIpassword\fR
支持基本的验证证书,用户名和密码之间使用"冒号" :
分隔开,ab将以明文方式传送过去.不管服务器是不是需要
,也就是说你的服务器需要支持401认证.
.TP
-c \fIconcurrency\fR
同时向服务器端发送的请求数目,默认状态下是一次
只执行一个http请求.
.TP
-C \fIcookie-name\fR=\fIvalue\fR
Add a Cookie: line to the request\&. The argument is typically in the form of a \fIname\fR=\fIvalue\fR pair\&. This field is repeatable\&.
.TP
-d
Do not display the "percentage served within XX [ms] table"\&. (legacy support)\&.
.TP
-e \fIcsv-file\fR
Write a Comma separated value (CSV) file which contains for each percentage (from 1% to 100%) the time (in milli seconds) it took to serve that percentage of the requests\&. This is usually more useful than the 'gnuplot' file; as the results are already 'binned'\&.
.TP
-g \fIgnuplot-file\fR
Write all measured values out as a 'gnuplot' or TSV (Tab separate values) file\&. This file can easily be imported into packages like Gnuplot, IDL, Mathematica, Igor or even Excell\&. The labels are on the first line of the file\&.
.TP
-h
显示使用说明
.TP
-H \fIcustom-header\fR
向请求包追加附加的标题字串.此参数应该是有效的标题
行(header line)形式,通常使用冒号":"来分隔有效配对
(valid pair)例如 'Accept-Encoding: zip/zop;8 bit';
.TP
-i
使用一个 http 头(HEAD) 来替换 GET方法.不可以掺入POST 方法
.TP
-k
允许http KeepAlive ;也就是说执行多个请求在一个
http 会话当中,默认是不允许的也就是no KeepAlive啦;)
.TP
-n \fIrequests\fR
执行一次测试会话的时候所发出的请求数目,默认是执行一个单一的请求
当然了这样的测试结果也就没什么意义了
.TP
-p \fIPOST-file\fR
测试程序也就是ab,将向Apache server发送带有HTTP POST
的请求.
.TP
-P \fIproxy-auth-username\fR:\fIpassword\fR
当需要通过代理测试一台HTTP 服务器的时候而你的代理
又需要用户名密码验证,这时你可以使用这个选项,同样
用户名与密码之间使用冒号":"分隔开,ab将之以明文的方式
发送出去,当然,前提是你的代理是处于407认证状态的
.TP
-q
When processing more than 150 requests, ab outputs a progress count on stderr every 10% or 100 requests or so\&. The -q flag will suppress these messages\&.
.TP
-s
When compiled in (ab -h will show you) use the SSL protected https rather than the http protocol\&. This feature is experimental and \fIvery\fR rudimentary\&. You probably do not want to use it\&.
.TP
-S
Do not display the median and standard deviation values, nor display the warning/error messages when the average and median are more than one or two times the standard deviation apart\&. And default to the min/avg/max values\&. (legacy support)\&.
.TP
-t \fItimelimit\fR
设置测试的时间的长短,使用这个选项ab将自动设置
测试请求会话数目为50000,然后以你设置的时间为
固定周期.默认状态下是没有时限的,也就是直到完成
你所设置的请求数目为止.
.TP
-T \fIcontent-type\fR
内容类型标头,使用在POST数据的时候.
.TP
-v \fIverbosity\fR
设置冗余级别,4级打印出每个请求标头的详细信息,
3级打印出回应代码(例如,404,200),2级打印出警告
信息和指示消息
.TP
-V
显示版本号并且退出
.TP
-w
打印输出结果到HTML表中. 默认的表是两列n行白底黑框
.TP
-x \fI-attributes\fR
使用字串来描述表的属性,该属性字串应该插入到
.TP
-X \fIproxy\fR[:\fIport\fR]
Use a proxy server for the requests\&.
.TP
-y \fI-attributes\fR
用于生成html表格每行的属性名 ( )
.TP
-z \fI-attributes\fR
用于生成html表格每列的属性名 ( | )
.SH "BUGS"
.PP
There are various statically declared buffers of fixed length\&. Combined with the lazy parsing of the command line arguments, the response headers from the server and other external inputs, this might bite you\&.
.PP
It does not implement HTTP/1\&.x fully; only accepts some 'expected' forms of responses\&. The rather heavy use of strstr(3) shows up top in profile, which might indicate a performance problem; \fIi\&.e\&.\fR, you would measure the ab performance rather than the server's\&.
.SH "参见 SEE ALSO"
httpd(8)
.SH "[中文版维护人]"
.B trcbilg
.SH "[中文版最新更新]"
.BR 2003.11.22
.SH "《中国linux论坛man手册翻译计划》:"
.BI http://cmpp.linuxforum.net
.SH "跋"
.br
本页面中文版由中文 man 手册页计划提供。
.br
中文 man 手册页计划:\fBhttps://github.com/man-pages-zh/manpages-zh\fR
| |