📄 httperf.man
字号:
.TH httperf 1 "30 Oct 2000".IX httperf.SH NAMEhttperf \- HTTP performance measurement tool.SH SYNOPSIS.B httperf.RB [ --add-header.IR S ].RB [ --burst-length.IR N ].RB [ --client.IR I / N ].RB [ --close-with-reset ].RB [ -d | --debug.IR N ].RB [ --failure-status.IR N ].RB [ -h | --help ].RB [ --hog ].RB [ --http-version.IR S ].RB [ --max-connections.IR N ].RB [ --max-piped-calls.IR N ].RB [ --method.IR S ].RB [ --no-host-hdr ].RB [ --num-calls .IR N ].RB [ --num-conns.IR N ].RB [ --period " [" d | u | e ] \fIT1\fR [ ,\fIT2\fR ]].RB [ --port.IR N ].RB [ --print-reply " [" header | body ] ].RB [ --print-request " [" header | body ] ].RB [ --rate.IR X ].RB [ --recv-buffer.IR N ].RB [ --retry-on-failure ].RB [ --send-buffer.IR N ].RB [ --server.IR S ].RB [ --server-name.IR S ].RB [ --session-cookie ].RB [ --ssl ].RB [ --ssl-ciphers.IR L ].RB [ --ssl-no-reuse ].RB [ --think-timeout.IR X ].RB [ --timeout.IR X ].RB [ --uri.IR S ].RB [ -v | --verbose ].RB [ -V | --version ].RB [ "--wlog y" | n, \fIF\fR].RB [ --wsess.IR N , N , X ].RB [ --wsesslog.IR N , X , F ].RB [ --wset.IR N , X ].SH DESCRIPTION.B httperfis a tool to measure web server performance. It speaks the HTTPprotocol both in its HTTP/1.0 and HTTP/1.1 flavors and offers avariety of workload generators. While running, it keeps track of anumber of performance metrics that are summarized in the form ofstatistics that are printed at the end of a test run. The most basicoperation of.B httperfis to generate a fixed number of HTTP GET requests and to measure howmany replies (responses) came back from the server and at what ratethe responses arrived..B IMPORTANT:To obtain correct results, it is necessary to run at most one.B httperfprocess per client machine. Also, there should be as few backgroundprocesses as possible both on the client and server machines..SH EXAMPLES.TPhttperf --hog --server wwwThis command causes.B httperfto create a connection to host www, send a request for the rootdocument (http://www/), receive the reply, close the connection, andthen print some performance statistics..TPhttperf --hog --server www --num-conn 100 --ra 10 --timeout 5Like above, except that a total of 100 connections are created andthat connections are created at a fixed rate of 10 per second. Notethat option ``--rate'' has been abbreviated to ``--ra''..TPhttperf --hog --server=www --wsess=10,5,2 --rate 1 --timeout 5Causes.B httperfto generate a total of 10 sessions at a rate of 1 session per second.Each session consists of 5 calls that are spaced out by 2 seconds..TPhttperf --hog --server=www --wsess=10,5,2 --rate=1 --timeout=5 --sslLike above, except that.B httperfcontacts server www via SSL at port 443 (the default port for SSLconnections)..TPhttperf --hog --server www --wsess=10,5,2 --rate=1 --timeout=5 --ssl --ssl-ciphers=EXP-RC4-MD5:EXP-RC2-CBC-MD5 --ssl-no-reuse --http-version=1.0Like above, except that.B httperfwill inform the server that it can only select from two cipher suites(EXP-RC4-MD5 or EXP-RC2-CBC-MD5); furthermore,.B httperfwill use HTTP version 1.0 which requires a new TCP connection for eachrequest. Also, SSL session ids are not reused, so the entire SSLconnection establishment process (known as the SSL handshake) occursfor each connection..SH OPTIONSThe operation of.B httperfcan be controlled through a number of options. The tool supports bothshort (one-character) and long (arbitrary-length) option names. Shortoptions are prefixed with a single leading dash (-), longoptions with a double-dash (--). Multiple short options can begrouped together (e.g.,.RB `` -vV ''is equivalent to.RB `` "-v -V" '')and long options can be abbreviated so long as they remain unique.Parameters to options can be specified either by following the longoption name with an equal sign and the parameter value (e.g.,.BR --burst=10 )or by separating the option name and value with whitespace (e.g.,.BR "--burst 10" )..TP.BI --add-header= SSpecifies to include string.I Sas an additional request header. It is necessary to specify theterminating carriage-return/line-feed sequence explicitly. This canbe done by using the escape sequence ``\\n''. This makes it possibleto include multiple request headers. For example, ``--add-header"Referer: foo\\nAuth: secret\\n"'' would add two request headers(``Referer'' and ``Auth'') to each request. Other supported escapesequences are ``\\r'' (carriage-return), ``\\a'' (line-feed), ``\\\\''(backslash), and ``\\N'' where N is the code the character to beinserted (in octal)..TP.BI --burst-length= NSpecifies the length of bursts. Each burst consists of.I Ncalls to the server. The exact meaning of this parameter depends onthe workload generator. For regular request-oriented workloads, see thedescription of option.TP.BR --no-host-hdrSpecifies that the "Host:" header should not be included when issuingan HTTP request..TP.BR --num-calls .For session-oriented workloads, see the description of option.BR --wsess ..TP.BI --client= I / NSpecifies that the machine.B httperfis running on is client.I Iout of a total of.I Nclients..I Ishould be in the range from 0 to.IR N "-1."Some of the workload generators (e.g.,.BR --wset)use the client identity as a bias value to ensure that not all clientsgenerate perfectly identical workloads. When performing a test thatinvolves several client machines, it is generally a good idea tospecify this option..TP.BI --close-with-resetRequests that.B httperfcloses TCP connections by sending a RESET instead of going through thenormal TCP connection shutdown handshake. Turning on this option canhave ill effects such as data corruption, stuck TCP control blocks, orwrong results. For this reason, the option should not be used unlessabsolutely necessary and even then it should not be used unless itsimplications are fully understood..TP.BI -d= N.TP.BI --debug= NSet debug level to.IR N .Larger values of.I Nwill result in more output..TP.BI --failure-status= NSpecifies that an HTTP response status code of.I Nshould be treated as a failure (i.e., treated as if the request hadtimed out, for example). For example, with.RB `` --failure-status=504 ''responses with an HTTP status of ``504 Gateway Time-out'' would beconsidered failures. Caveat: this option is currently supportedfor session workloads only (see the.B --wsessand.B --wsesslogoptions)..TP.B -h.TP.B --helpPrints a summary of available options and their parameters..TP.BI --hogThis option requests to use up as many TCP ports as necessary.Without this option,.B httperfis typically limited to using ephemeral ports (in the range from 1024to 5000). This limited port range can quickly become a bottleneck soit is generally a good idea to specify this option for serioustesting. Also, this option must be specified when measuring NTservers since it avoids a TCP incompatibility between NT and UNIXmachines..TP.BI --http-version= SSpecifies the version string that should be included in the requestssent to the server. By default, version string ``1.1'' is used. Thisoption can be set to ``1.0'' to force the generation of HTTP/1.0requests. Setting this option to any value other than ``1.0'' or ``1.1''may result in undefined behavior..TP.BI --max-connections= NSpecifies that at most.I Nconnections are opened for each session. This option is meaningful inconjunction with options.B --wsessand.B --wsesslogonly..TP.BI --max-piped-calls= NSpecifies that at most.I Npipelined calls are issued on each connection. This option ismeaningful in conjunction with options.B --wsessand.B --wsesslogonly..TP.BI --method= SSpecifies the method that should be used when issuing an HTTP request.If this option is not specified, the GET method is used. The method.I Scan be an arbitrary string but is usually one of GET, HEAD, PUT, POST,etc..TP.BI --num-calls= NThis option is meaningful for request-oriented workloads only. Itspecifies the total number of calls to issue on each connection beforeclosing it. If.I Nis greater than 1, the server must support persistent connections.The default value for this option is 1. If.BR --burst-lengthis set to.IR B ,then the.I Ncalls are issued in bursts of.I Bpipelined calls each. Thus, the total number of such bursts willbe.I N/B(per connection)..TP.BI --num-conns= NThis option is meaningful for request-oriented workloads only. Itspecifies the total number of connections to create. On eachconnection, calls are issued as specified by options.B --num-callsand.BR --burst-length .A test stops as soon as the.I Nconnections have either completed or failed. A connection isconsidered to have failed if any activity on the connection fails tomake forward progress for more than the time specified by the timeoutoptions.B --timeoutand.BR --think-timeout .The default value for this option is 1..TP.BI --period= [D]T1[,T2]Specifies the time interval between the creation of connections or sessions.Connections are created by default, sessions if option.B --wsessor.B --wsessloghas been specified.This connection/session ``interarrival time'' can alternatively be specified bythe .B --rateoption, although more flexibility is available with.B --period.The.I Dparameter specifies the interarrival time distribution.If omitted or set to.RB `` d '',a deterministic (i.e., fixed) period is used as specifiedby parameter.IR T1in units of seconds.If.I Dis set to .RB `` e '',an exponential (i.e., Poisson) distribution is used witha mean interarrival time of.IR T1 .Finally, if.I Dis set to .RB `` u '',a uniform distribution over the interval.RI [ T1 , T2 )is used for the interarrival time.In all cases, a period of 0 results in connectionsor sessions being generated sequentially (a new connection/session isinitiated as soon as the previous one completes). The default valuefor this option is 0. Note that specifying, for example,.B --rate=5is equivalent to specifying.B --period=d0.2or.BR --period=0.2 .By specifying.BR --period=u1,3 ,the interarrival times will be randomly chosen from the intervalbetween 1 and 3 seconds. The specific sequence of (pseudo-)randominterarrival times are identical from one.B httperfrun to another as long as the values for the.B --periodand.B --clientoptions are identical..TP.BI --port= NThis option specifies the port number.I Non which the web server is listening for HTTP requests. By default,.B httperfuses port number 80..TP.BR --print-reply [ = [ header | body ]]Requests the printing of the reply headers, body, and summary. Theoutput is directed to standard output. Reply header lines areprefixed by "RH", reply body lines are prefixed by "RB", and thereply-size summary is prefixed by "RS". The prefix is followed by aserial number that uniquely identifies the call that the reply line isfor and a colon (":") character that marks the beginning of the actualreply line. To print only reply headers, pass argument.B headerto this option. To print only the reply body, pass argument.B bodyto this option..TP.BR --print-request [ = [ header | body ]]Requests the printing of the request headers, body (if one ispresent), and summary. The output is directed to standard output.Request header lines are prefixed by "SH", request body lines areprefixed by "SB", and the request summary is prefixed by "SS". The
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -