⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 httperf.man

📁 一个WEB服务器的性能测试工具
💻 MAN
📖 第 1 页 / 共 3 页
字号:
prefix is followed by the call's serial number and a colon (":")character that marks the beginning of the actual reply line.  To printonly request headers, pass argument.B headerto this option.  To print only the request body, pass argument.B bodyto this option..TP.BI --rate= XSpecifies the fixed rate at which connections or sessions are created.Connections are created by default, sessions if option.B --wsessor.B --wsessloghas been specified.  In both cases a rate of 0 results in connectionsor sessions being generated sequentially (a new session/connection isinitiated as soon as the previous one completes).  The default valuefor this option is 0..TP.BI --recv-buffer= NSpecifies the maximum size of the socket receive buffers used toreceive HTTP replies.  By default, the limit is 16KB.  A smaller valuemay help memory-constrained clients whereas a larger value may benecessary when communicating with a server over a high-bandwidth,high-latency connection..TP.BI --retry-on-failureThis option is meaningful for session workloads only (see the.B --wsessand.B --wsesslogoptions).  If specified, a call that results in a failure response (asdefined by the.B --failure-statusoption) is retried immediately instead of causing the session to fail..TP.BI --send-buffer= NSpecifies the maximum size of the socket send buffers used to sendHTTP requests.  By default, the limit is 4KB.  A smaller value mayhelp memory-constrained clients whereas a larger value may benecessary when generating large requests to a server connected via ahigh-bandwidth, high-latency connection..TP.BI --server= SSpecifies the IP hostname of the server.  By default, the hostname``localhost'' is used.  This option should always be specified as itis generally not a good idea to run the client and the server on thesame machine..TP.BI --server-name= SSpecifies the (default) server name that appears in the "Host:" headerof every request sent by.BR httperf .Without this option, the host name (or IP address) specified by option.B --serveris used instead..TP.B --session-cookieWhen this option is turned on, cookie managment is enabled on aper-session basis.  What this means is that if a reply to a requestthat was generated by session.IR X contains a cookie, then all future requests sent by session.I Xwill include this cookie as well.  At present, the cookie manager in.B httperfsupports only one cookie per session.  If a second cookie is received,the new cookie overwrites the existing one and a warning message isprinted if ``--debug 1'' is on..TP.B --sslSpecifies that all communication between.B httperfand the server should utilize the Secure Sockets Layer (SSL) protocol.This option is available only if.B httperfwas compiled with SSL support enabled..TP.BI --ssl-ciphers= LThis option is only meaningful if SSL is in use (see.B --ssloption).  This option specifies the list.I Lof cipher suites that.B httperfmay use in negotiating a secure connection with the server.  If thelist contains more than one cipher suite, the ciphers must beseparated by a colon.  If the server does not accept any of the listedcipher suites, the connection establishment will fail and.B httperfwill exit immediately.  If this option is not specified when the.B --ssloption is present then.B httperfwill use all of the SSLv3 cipher suites provided by the underlying SSLlibrary..TP.B --ssl-no-reuseThis option is only meaningful if SSL and sessions are in use (see.BR --ssl ,.BR --wsess ,.BR --wsesslog ).When an SSL connection is established the client receives a sessionidentifier (session id) from the server.  On subsequent SSLconnections, the client normally reuses this session id in order toavoid the expense of repeating the (slow) SSL handshake to establish anew SSL session and obtain another session id (even if the clientattempts to re-use a session id, the server may force the client torenegotiate a session).  By default.B httperfreuses the session id across all connections in a session.  If the.B --ssl-no-reuseoption is in effect, then.B httperfwill not reuse the session id, and the entire SSL handshake will beperformed for each new connection in a session..TP.BI --think-timeout= XSpecifies the maximum time that the server may need to initiatesending the reply for a given request.  Note that this timeout valueis added to the normal timeout value (see option.BR --timeout ).When accessing static web content, it is usually not necessary tospecify this option.  However, when performing tests with long-runningCGI scripts, it may be necessary to use this option to allow forlarger response-times.  The default value for this option is zeroseconds, meaning that the server has to be able to respond within thenormal timeout value..TP.BI --timeout= XSpecifies the amount of time.I Xthat.B httperfis willing to wait for a server reaction.  The timeout is specified inseconds and can be a fractional number (e.g.,.BR "--timeout 3.5" ).This timeout value is used when establishing a TCP connection, whensending a request, when waiting for a reply, and when receiving areply.  If during any of those activities a request fails to makeforward progress within the alloted time,.B httperfconsiders the request to have died, closes the associated connectionor session and increases the.B client-timoerror count.  The actual timeout value used when waiting for a replyis the sum of this timeout and the think-timeout (see option.BR --think-timeout ).By default, the timeout value is infinity..TP.BI --uri= SSpecifies that URI.I Sshould be accessed on the server.  For some of the workload generators(e.g.,.BR --wset ),this option specifies the prefix for the URIs being accessed..TP.B -v.TP.B --verbosePuts.B httperfinto verbose mode.  In this mode, additional output such as theindividual reply rate samples and connection lifetime histogram areprinted..TP.B -V.TP.B --versionPrints the version of.BR httperf ..TP.BI --wlog= B , FThis option can be used to generate a specific sequence of URIaccesses.  This is useful to replay the accesses recorded in a serverlog file, for example.  Parameter.I Fis the name of a file containing the ASCII NUL separated list of URIsthat should be accessed.  If parameter.I Bis set to.RB `` y '',.B httperfwill wrap around to the beginning of the file when reaching the end ofthe list (so the list of URIs is accessed repeatedly).  With.I Bset to.RB `` n '',the test will stop no later than when reaching the end of the URIlist..TP.BI --wsess= N1 , N2 , XRequests the generation and measurement of sessions instead ofindividual requests.  A session consists of a sequence of bursts whichare spaced out by the user think-time.  Each burst consists of a fixednumber.I Lof calls to the server.RI ( Lis specified by option.BR --burst-length ).The calls in a burst are issued as follows: at first, a single call isissued.  Once the reply to this first call has been fully received,all remaining calls in the burst are issued concurrently.  Theconcurrent calls are issued either as pipelined calls on an existingpersistent connection or as individual calls on separate connections.Whether a persistent connection is used depends on whether the serverresponds to the first call with a reply that includes a ``Connection:close'' header line.  If such a line is present, separate connectionsare used.The option specifies the following parameters:.I N1is the total number of sessions to generate,.I N2is the number of calls per session, and.I Xis the user think-time (in seconds) that separates consecutive callbursts.  For example, the options.RB `` "--wsess=100,50,10 --burst-len 5" ''would result in 100 sessions with a total of 50 calls each.  Sinceeach burst has a length of 5 calls, a total of 10 call bursts would begenerated per session.  The user think-time between call bursts wouldbe 10 seconds.  Note that user think-time.I Xdenotes the time between receiving the last reply of the previouscall burst and the sending of the first request of the next burst.A test involving sessions finishes as soon as the requested number.I N1of sessions have either failed or completed.  A session is consideredto have failed if any operation in a session takes longer thanthe timeouts specified by options.B --timeoutand.BR --think-timeout .In addition, a session also fails if the server returns a reply with astatus code matching the one specified by option.BR --failure-status ..TP.BI --wsesslog= N , X , FThis specifies a session workload generator similar to.B --wsess(please read that description first).  With.B --wsesslogthough, many aspects of user sessions, including the number andsequence of URI's, request method, think-time and burst-length parameters, can be specified in an input file.I F.Two other parameters are retained from.B --wsess,namely.I N,the number of sessions to initiate, and.I X,the burst-to-burst user think time (note that this becomes a defaulttime since the input file.I Fcan also specify user think time on a per-burst basis.A small example input file can most-easily show the settable parameters:.br.br# Comment lines start with a ``#'' as the first.br# character.  Lines with only whitespace delimit.br# sessions (multiple blank lines do not generate.br# ``null'' sessions).  All other lines specify a.br# uri-sequence (1 uri per line).  If the first.br# character of the line is whitespace (e.g. space.br# or tab), the uri is considered to be part of a.br# burst that is sent out after the previous.br# non-burst uri..br.br# session 1 definition (this is a comment).br/foo.html think=2.0.br	/pict1.gif.br	/pict2.gif.br/foo2.html method=POST contents='Post data'.br	/pict3.gif.br	/pict4.gif.br	.br# session 2 definition.br/foo3.html method=POST contents="Multiline\\ndata".br/foo4.html method=HEAD.br.brThe above description specifies 2 sessions.  The first session willstart with a request for /foo.html.  When the /foo.html response comesback, a burst of 2 requests will follow (/pict1.gif and /pict2.gif).When the last of those responses is received, a two second user thinktime is inserted before the next request of /foo2.html is issued.This request is sent as a POST.  The posted data can be containedbetween single- or double-quotes.  Newlines can appear within posteddata as ``\\n'' or as a ``\\<CR>''.  The /foo2.html response isfollowed by a burst request of /pict3.gif and /pict4.gif, whichconcludes this session.  The second session is started some time afterthe first, as specified by the.B --rateor.B --periodoptions..br	.brThe second session consists of 2 requests separated by the default user thinktime as specified by the.I Xparameter of the.B --wsesslogoption.  If the.I Nparameter of.B --wsesslogis greater than the number of sessions defined in input file.IR F ,then the defined sessions are used repeatedly until.I Nsessions have been created (i.e., the defined sessions are used in around-robin fashion)..br	.brOne should avoid using.B --wsesslogin conjunction with other.B httperfoptions that also control session behavior and workload URI's, namely.B --burst-length,.B --wsess,.B --wlog,and.B --wset..TP.BI --wset= N , XThis option can be used to walk through a list of URIs at a givenrate.  Parameter.I Nspecifies the number of distinct URIs that should be generated and.I Xspecifies the rate at which new URIs are accessed.  A rate of.B 0.25would mean that the same URI would be accessed four times in a rowbefore moving on to the next URI.  This type of access pattern isuseful in generating a workload that induces a relatively predictableamount of traffic in the disk I/O subsystem of the server (assuming.I Nand the accessed files are big enough to exceed the server's buffercache).  The URIs generated are of the form.IR	prefix / path .html,where.I prefixis the URI prefix specified by option.B --wsetand.I pathis generated as follows: for the.IR i -thfile in the working set, write down.I iin decimal, prefixing the number with as many zeroes as necessaryto get a string that has as many digits as.IR N -1.Then insert a slash character between each digit.  For example,the 103rd file in a working set consisting of 1024 files wouldresult in a path of.RB `` 0/1/0/3 ''.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -