ab – Apache HTTP Server Benchmarking Tool, translated into Chinese
1. The original English address is:https://httpd.apache.org/docs/2.4/programs/ab.html,如图1
2. The options are translated as follows:
ab – Apache HTTP Server Benchmarking Tool
ab – Apache HTTP Server Stress Testing Tool
Available languages: en | fr | ko | tr
Available languages: EN | FR | KO | TR
AB is a tool for benchmarking your apache hypertext transfer protocol (http) server. It is designed to give you an This especially shows you how many requests per second your Apache installation is caught of serving.
AB is a tool for performance testing of the Apache Hypertext Transfer Protocol (HTTP) server. It is designed to give you an idea of the execution performance of the currently installed Apache. Mainly shows the number of requests per second that the Apache you installed can serve (that is, the number of requests that can be handled per second).
synopsis
Summary
ab[ -A auth-username:password ][ -b windowsize ][ -B local-address ][ -c concurrency ][ -C cookie-name=value ][ -d ][ -e csv-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
ab[ -A 认证用户名:密码 ][ -b 窗口大小 ][ -B 本地地址 ][ -c 并发数 ][ -C cookie名称=值 ][ -d ][ -e csv文件 ][ -f 协议 ][ -g gnuplot文件 ][ -h ][ -H 自定义头信息 ][ -i ][ -k ][ -l ][ -m HTTP方法 ][ -n 请求数 ][ -p POST文件 ][ -P 代理认证用户名:密码 ][ -q ][ -r ][ -s 超时 ][ -S ][ -t 时间限制 ][ -T 内容类型 ][ -u PUT文件 ][ -v 详细][ -V ][ -w ][ -x <表> -属性 ][ -X 代理[:端口]][ -y <行> -属性 ][ -z <列> -属性 ][ -Z 密码套件 ][http[s]//]hostname[:端口]/path
options
Options
-a auth-username:password
Supply basic authentication credentials to the server. The username and password are separated by a single : and sent on the wire base64 Encoded. The string is sent an 401 authentication need.
-a Authentication Username:Password
Provide BASIC authentication credentials to the server. Username and password are separated by: and sent in the form of base64 encoding. This string will be sent regardless of whether the server needs it (i.e., if it is required for 401 authentication is sent).
-b windowsize
Size of TCP send/receive buffer, in bytes.
-b window size
The size of the TCP transmit/receive buffer in bytes.
-b local-address
Address to bind to when making outgoing connections.
-b local address
The address to be bound when the connection is issued.
-c concurrency
Number of multiple requests to perform at a time. Default is one request at a time.
-c concurrent number
The number of requests executed at a time. The default is one request at a time.
-c cookie-name=value
Add a cookie: line to the request. The argument is typically in the form of a name=value pair. This field is repeatable.
-c cookie name = value
Add cookie: line to the request. The form of the parameter is usually name=value pair. This parameter is repetitive.
-d
Do not display the “percentage served within xx[ms]table”. (legacy support).
-d
Do not display “in xx[ms]% of the tables provided in the table. (supported for previous versions).
-e csv-file
Write a comma separate value (CSV) file which contains contains for each percentage (from 1% to 100%) the time (in milliseconds) it This is usually more useful than thegnuplotfile; as the results are alreadybinned.
-e csv file
Write a comma-separated (CSV) file with each percentage (from 1% to 100%) to provide the time spent in milliseconds for that percentage request. This is usually better thangnuplotFormat files are more useful; because the results are already “merged”.
-f protocol
Specify SSL/TLS Protocol (SSL2, SSL3, TLS1, TLS1.1, TLS1.2, or ALL). TLS1.1 and TLS1.2 Support available in 2.4.4 and later.
-f agreement
Specifies the SSL/TLS protocol (SSL2, SSL3, TLS1, TLS1.1, TLS1.2 or ALL). Support for TLS1.1 and TLS1.2 is provided in 2.4.4 and later.
-g gnuplot-file
Write all measured values out as agnuplotor TSV (Tab Separate Values) file. or even Excel. The labels are on the first line of the file.
-g gnuplot file
Write all measurements to a “gnuplot” or tsv (separated) file. This file can be easily imported into packages such as Gnuplot, IDL, Mathematica, Igor and even Excel. The title is on the first line of the file.
-h
Display usage information.
-h
Display usage information.
-h custom-header
Append extra headers to the request. field-value pair (i.e., “accept-encoding: zip/zop;8bit”).
-h custom header information
Additional header information is added for the request. The form of a parameter is usually a valid header information line, containing the pairs of colon-separated fields and values (i.e. “accept-encoding: zip / zop; 8bit”).
-i
Do head requests instead of get.
-i
Execute the HEAD request instead of GET.
-k
Enable the HTTP KeepAlive Feature, I.E., Perform multiple requests within one HTTP session. Default is no keepalive.
-k
Enable the HTTP KeepAlive function, that is, perform multiple requests within one HTTP session. The keepalive function is not enabled by default.
-l
This can be used for dynamic pages. Available in 2.4.7 and later.
-l
If the length of the response is not constant, the error is not reported. This may be useful for dynamic pages. Available in 2.4.7 and later.
-m http-method
Custom HTTP method for the requests. Available in 2.4.10 and later.
-m http method
You can customize the HTTP method in the request. Available in 2.4.10 and later.
-n requests
Number of requests to perform for the benchmarking session. The default is to just perform a single request which usually leads to non-representative benchmarking results.
-n number of requests
The number of execution requests within the benchmark test session. The default is to only execute a single request, and usually its benchmark results are not representative.
-p post-file
File container to also set -t.
-p post file
Filename containing POST data. Remember that you also need to set -t.
-p proxy-auth-username:password
Supply basic authentication credentials to a proxy en-route. The username and password are separately : and sent on the Wire base64 encoded. Needed).
-p proxy authentication username: password
Provide BASIC authentication credentials to the proxy route. Username and password are separated by: and sent in the form of base64 encoding. This string is sent, regardless of whether the proxy needs it (i.e., 407 proxy authentication is already sent).
-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 support these messages.
-q
When the number of processing requests exceeds 150, the AB will output the progress count for every 10% or 100 requests processed. The -q mark will suppress these messages.
-r
DonT exit on socket receive errors.
-r
Do not exit when the socket receives an error.
-s timeout
maximum number of seconds to wait before the socket times out. Default is 30 seconds. Available in 2.4.4 and later.
-s timeout
The maximum number of seconds to wait before the socket timeout. The default value is 30 seconds. Available in 2.4.4 and later.
-s
Do not display the media and standard deviation values, nor display the warning messages when the average and standard are more than One or two times the standard deviation apart. and default to the min/avg/max values. (Legacy Support).
-s
Do not display the median and standard deviation values, and do not display warning/errors when the mean and median are double or more than the standard deviation value. And it is displayed as minimum/average/maximum by default. (support for previous versions).
-t timelimit
Maximum number of seconds to spend for benchmarking. This implies a -n 50000 internally. Fixed total amount of time. Per default there is no timelimit.
-t time limit
Maximum number of seconds used for benchmark tests. Its internal default implied -N 50000. It can limit tests to the server to a fixed total time. There is no time limit by default.
-t content-type
content-type header to use for post/put data, eg. application/x-www-form-urlencoded. default is text/plain.
-t content type
Content-Type header information for POST/PUT data, for example: application/x-www-form-urlencoded. The default is text/plain.
-u put-file
File container to put.
-u put file
File name containing PUT data. Remember that you also need to set -t.
-v verbosity
Set verbosity level – 4 and above prints information on headers, 3 and above prints response codes (404, 200, etc.), 2 and above prints warnings and info.
-v detail
Set the level of detail of the displayed information – printhead information of 4 and above, 3 or more print response codes (404, 200, etc.), 2 and above print warnings and information.
-v
Display version number and exit.
-v
Display the version number and exit.
-w
Print out results in HTML tables. Default table is two columns wide, with a white background.
-w
Print the results in the HTML table. The default is a table with two columns wide, with a white background.
-x <table>-attributes
String to use as attributes for <table>. attributes are inserted <table here >
-x <table> – attribute
A string that sets the properties of the table. This property is inserted <table here>.
-x proxy[:port]
Use a proxy server for the requests.
-x agent[:端口]
Use a proxy server for requests.
-y <tr>-attributes
String to use as attributes for <tr>.
-y <line> -property
A string that sets the properties of the line.
-z <td>-attributes
String to use as attributes for <td>.
-z <column> -property
A string that sets the properties of the column.
-Z CipherSuite
Specify SSL/TLS Cipher Suite (See OpenSSL Ciphers)
-Z Cipher Suite
Specify the SSL/TLS cipher suite (see OpenSSL password)
2. The output translation is as follows:
output
Export
The following lists the values returned by ab:
The following list describes the values returned by AB:
Server Software
The value, if any, returned in the server HTTP header of the first successful response. This includes all characters in the header From beginning to the point a character with decimal value of 32 (most notably: a space or CR/LF) is detected.
server software
Return value (if any) in the HTTP header of the first successful response to the server. This includes all the characters in the header information that has been detected in the decimal value of 32 (most notable: spaces or CR/LF) in the header information.
server hostname
The DNS or IP Address gives on the command line
server hostname
DNS or IP address given on the command line
Server port
The port to which ab is connected. https.
server port
AB connection port. If the port is not given on the command line, then HTTP will default to 80, and for HTTPS it is 443.
SSL/TLS Protocol
This will only be printed if SSL is used.
SSL/TLS protocol
Protocol parameters negotiated between the client and server. This output will be printed only when SSL is used.
document path
The request uri parsed from the command line string.
Document (request root) path
The request URI parsed from the command line string.
document length
This is the size in bytes of the first successfully returned test, the response is considered an error.
Document length
This is the size (in bytes) of the first document that was returned successfully. If the document length changes during testing, the response is considered wrong.
concurrency level
The number of concurrent clients used during the test
Concurrency level (number of users)
Number of concurrent clients used during testing
Time Taken for Tests
This is the time taken from the moment the first socket connection is created to the last response is received
Test time
This is the length of time from the moment the first socket connection is created to the time when the last response is received
complete requests
The number of successes received
Number of requests to complete
The number of successful responses received
failed requests
The number of requests that were considered a failure. Number of requests that failed due to connection, reading, incorrect content length, or exceptions.
Number of failed requests
The number of requests that are considered failed. If the number is greater than zero, another line will be printed to display the number of failed requests due to the connection server, the content length is incorrect or abnormal.
write errors
The number of errors that failed during (Broken pipe).
Write errors
The number of errors (disconnected) that failed while writing.
non-2xx responses
The number of responses that were not in the 200 series of response codes. If all responds were 200, this field is not printed.
Non-2xx response
Number of responses not in the 200 series response status code. If all responses are 200, this field is not printed.
keep-alive requests
The number of connections that resulted in keep-alive requests
keep-alive request
The number of connections that cause the keep-alive request
Total Body Sent
If configured to send data as part of the test, this field is omitted if The test did not include a body to send.
The total number of bytes of the request body
This output is the total number of bytes sent during the test if the request body is configured as part of the data at the time of the test. If the test data does not contain the request body, the field will be omitted.
Total Transferred
The number of bytes received from the server.
Total number of bytes of response data
Total number of bytes received from the server. This number is essentially the number of bytes transmitted by the network.
HTML Transferred
The total number of document bytes received from the server. This number excludes bytes received in HTTP headers
total number of bytes of response body
The total number of file bytes received from the server. This number does not include the number of bytes received in the HTTP header
requests per second
This value is the result of dividing the number of requests by the total time taken
Requests per second
This is the number of requests per second. This value is the result of dividing the number of requests by the total time (complete requests/time Taken for tests)
time per request
The Average time spend per request. The first value is calculated with the Formula concurrency while the second value is calculated with the formula timetaken * 1000 / done
User average request wait time
The average time spent per request. Pass formula: test time spent * 1000 (time take for tests * 1000) / (number of concurrent users * completed requests) ( concurrency level * complete requests)
transfer rate
The rate of transfer as Calculated by the Formula TotalRead / 1024 / TimeTaken
transmission rate
Transfer rate through formula: total bytes of response data / 1024 / test time spent (Total Transferred / 1024 / Time Taken for tests) Calculated
