github.com/krum110487/go-htaccess@v0.0.0-20240316004156-60641c8e7598/tests/data/apache_2_2_34/manual/programs/ab.html.en (about) 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head> 4 <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" /> 5 <!-- 6 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 7 This file is generated from xml source: DO NOT EDIT 8 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 9 --> 10 <title>ab - Apache HTTP server benchmarking tool - Apache HTTP Server Version 2.2</title> 11 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" /> 12 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" /> 13 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="../style/css/prettify.css" /> 14 <script src="../style/scripts/prettify.min.js" type="text/javascript"> 15 </script> 16 17 <link href="../images/favicon.ico" rel="shortcut icon" /><link href="http://httpd.apache.org/docs/current/programs/ab.html" rel="canonical" /></head> 18 <body id="manual-page"><div id="page-header"> 19 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p> 20 <p class="apache">Apache HTTP Server Version 2.2</p> 21 <img alt="" src="../images/feather.gif" /></div> 22 <div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div> 23 <div id="path"> 24 <a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.2</a> > <a href="./">Programs</a></div><div id="page-content"><div class="retired"><h4>Please note</h4> 25 <p> This document refers to a legacy release (<strong>2.2</strong>) of Apache httpd. The active release (<strong>2.4</strong>) is documented <a href="http://httpd.apache.org/docs/current">here</a>. If you have not already upgraded, please follow <a href="http://httpd.apache.org/docs/current/upgrading.html">this link</a> for more information.</p> 26 <p>You may follow <a href="http://httpd.apache.org/docs/current/programs/ab.html">this link</a> to go to the current version of this document.</p></div><div id="preamble"><h1>ab - Apache HTTP server benchmarking tool</h1> 27 <div class="toplang"> 28 <p><span>Available Languages: </span><a href="../en/programs/ab.html" title="English"> en </a> | 29 <a href="../ko/programs/ab.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | 30 <a href="../tr/programs/ab.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> 31 </div> 32 33 <p><code>ab</code> is a tool for benchmarking your Apache Hypertext 34 Transfer Protocol (HTTP) server. It is designed to give you an impression 35 of how your current Apache installation performs. This especially shows 36 you how many requests per second your Apache installation is capable of 37 serving.</p> 38 </div> 39 <div id="quickview"><ul id="toc"><li><img alt="" src="../images/down.gif" /> <a href="#synopsis">Synopsis</a></li> 40 <li><img alt="" src="../images/down.gif" /> <a href="#options">Options</a></li> 41 <li><img alt="" src="../images/down.gif" /> <a href="#output">Description of output</a></li> 42 <li><img alt="" src="../images/down.gif" /> <a href="#bugs">Bugs</a></li> 43 </ul><h3>See also</h3><ul class="seealso"><li><code class="program"><a href="../programs/httpd.html">httpd</a></code></li></ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div> 44 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> 45 <div class="section"> 46 <h2><a name="synopsis" id="synopsis">Synopsis</a></h2> 47 <p><code><strong>ab</strong> 48 [ -<strong>A</strong> <var>auth-username</var>:<var>password</var> ] 49 [ -<strong>b</strong> <var>windowsize</var> ] 50 [ -<strong>c</strong> <var>concurrency</var> ] 51 [ -<strong>C</strong> <var>cookie-name</var>=<var>value</var> ] 52 [ -<strong>d</strong> ] 53 [ -<strong>e</strong> <var>csv-file</var> ] 54 [ -<strong>f</strong> <var>protocol</var> ] 55 [ -<strong>g</strong> <var>gnuplot-file</var> ] 56 [ -<strong>h</strong> ] 57 [ -<strong>H</strong> <var>custom-header</var> ] 58 [ -<strong>i</strong> ] 59 [ -<strong>k</strong> ] 60 [ -<strong>n</strong> <var>requests</var> ] 61 [ -<strong>p</strong> <var>POST-file</var> ] 62 [ -<strong>P</strong> <var>proxy-auth-username</var>:<var>password</var> ] 63 [ -<strong>q</strong> ] 64 [ -<strong>r</strong> ] 65 [ -<strong>s</strong> ] 66 [ -<strong>S</strong> ] 67 [ -<strong>t</strong> <var>timelimit</var> ] 68 [ -<strong>T</strong> <var>content-type</var> ] 69 [ -<strong>u</strong> <var>PUT-file</var> ] 70 [ -<strong>v</strong> <var>verbosity</var>] 71 [ -<strong>V</strong> ] 72 [ -<strong>w</strong> ] 73 [ -<strong>x</strong> <var><table>-attributes</var> ] 74 [ -<strong>X</strong> <var>proxy</var>[:<var>port</var>] ] 75 [ -<strong>y</strong> <var><tr>-attributes</var> ] 76 [ -<strong>z</strong> <var><td>-attributes</var> ] 77 [ -<strong>Z</strong> <var>ciphersuite</var> ] 78 [http[s]://]<var>hostname</var>[:<var>port</var>]/<var>path</var></code></p> 79 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> 80 <div class="section"> 81 <h2><a name="options" id="options">Options</a></h2> 82 <dl> 83 <dt><code>-A <var>auth-username</var>:<var>password</var></code></dt> 84 <dd>Supply BASIC Authentication credentials to the server. The username and 85 password are separated by a single <code>:</code> and sent on the wire 86 base64 encoded. The string is sent regardless of whether the server needs 87 it (<em>i.e.</em>, has sent an 401 authentication needed).</dd> 88 89 <dt><code>-b <var>windowsize</var></code></dt> 90 <dd>Size of TCP send/receive buffer, in bytes.</dd> 91 92 <dt><code>-c <var>concurrency</var></code></dt> 93 <dd>Number of multiple requests to perform at a time. Default is one 94 request at a time.</dd> 95 96 <dt><code>-C <var>cookie-name</var>=<var>value</var></code></dt> 97 <dd>Add a <code>Cookie:</code> line to the request. The argument is 98 typically in the form of a <code><var>name</var>=<var>value</var></code> 99 pair. This field is repeatable.</dd> 100 101 <dt><code>-d</code></dt> 102 <dd>Do not display the "percentage served within XX [ms] table". (legacy 103 support).</dd> 104 105 <dt><code>-e <var>csv-file</var></code></dt> 106 <dd>Write a Comma separated value (CSV) file which contains for each 107 percentage (from 1% to 100%) the time (in milliseconds) it took to serve 108 that percentage of the requests. This is usually more useful than the 109 'gnuplot' file; as the results are already 'binned'.</dd> 110 111 <dt><code>-f <var>protocol</var></code></dt> 112 <dd>Specify SSL/TLS protocol (SSL2, SSL3, TLS1, or ALL).</dd> 113 114 <dt><code>-g <var>gnuplot-file</var></code></dt> 115 <dd>Write all measured values out as a 'gnuplot' or TSV (Tab separate 116 values) file. This file can easily be imported into packages like Gnuplot, 117 IDL, Mathematica, Igor or even Excel. The labels are on the first line of 118 the file. </dd> 119 120 <dt><code>-h</code></dt> 121 <dd>Display usage information.</dd> 122 123 <dt><code>-H <var>custom-header</var></code></dt> 124 <dd>Append extra headers to the request. The argument is typically in 125 the form of a valid header line, containing a colon-separated field-value 126 pair (<em>i.e.</em>, <code>"Accept-Encoding: zip/zop;8bit"</code>).</dd> 127 128 <dt><code>-i</code></dt> 129 <dd>Do <code>HEAD</code> requests instead of <code>GET</code>.</dd> 130 131 <dt><code>-k</code></dt> 132 <dd>Enable the HTTP KeepAlive feature, <em>i.e.</em>, perform multiple 133 requests within one HTTP session. Default is no KeepAlive.</dd> 134 135 <dt><code>-n <var>requests</var></code></dt> 136 <dd>Number of requests to perform for the benchmarking session. The default 137 is to just perform a single request which usually leads to 138 non-representative benchmarking results.</dd> 139 140 <dt><code>-p <var>POST-file</var></code></dt> 141 <dd>File containing data to POST. Remember to also set <code>-T</code>.</dd> 142 143 <dt><code>-P <var>proxy-auth-username</var>:<var>password</var></code></dt> 144 <dd>Supply BASIC Authentication credentials to a proxy en-route. The 145 username and password are separated by a single <code>:</code> and sent on 146 the wire base64 encoded. The string is sent regardless of whether the 147 proxy needs it (<em>i.e.</em>, has sent an 407 proxy authentication 148 needed).</dd> 149 150 <dt><code>-q</code></dt> 151 <dd>When processing more than 150 requests, <code>ab</code> outputs a 152 progress count on <code>stderr</code> every 10% or 100 requests or so. The 153 <code>-q</code> flag will suppress these messages.</dd> 154 155 <dt><code>-r</code></dt> 156 <dd>Don't exit on socket receive errors.</dd> 157 158 <dt><code>-s</code></dt> 159 <dd>When compiled in (<code>ab -h</code> will show you) use the SSL 160 protected <code>https</code> rather than the <code>http</code> protocol. 161 This feature is experimental and <em>very</em> rudimentary. You probably 162 do not want to use it.</dd> 163 164 <dt><code>-S</code></dt> 165 <dd>Do not display the median and standard deviation values, nor display 166 the warning/error messages when the average and median are more than 167 one or two times the standard deviation apart. And default to the 168 min/avg/max values. (legacy support).</dd> 169 170 <dt><code>-t <var>timelimit</var></code></dt> 171 <dd>Maximum number of seconds to spend for benchmarking. This implies a 172 <code>-n 50000</code> internally. Use this to benchmark the server within a 173 fixed total amount of time. Per default there is no timelimit.</dd> 174 175 <dt><code>-T <var>content-type</var></code></dt> 176 <dd>Content-type header to use for POST/PUT data, eg. 177 <code>application/x-www-form-urlencoded</code>. 178 Default: <code>text/plain</code>.</dd> 179 180 <dt><code>-u <var>PUT-file</var></code></dt> 181 <dd>File containing data to PUT. Remember to also set <code>-T</code>.</dd> 182 183 <dt><code>-v <var>verbosity</var></code></dt> 184 <dd>Set verbosity level - <code>4</code> and above prints information on 185 headers, <code>3</code> and above prints response codes (404, 200, etc.), 186 <code>2</code> and above prints warnings and info.</dd> 187 188 <dt><code>-V</code></dt> 189 <dd>Display version number and exit.</dd> 190 191 <dt><code>-w</code></dt> 192 <dd>Print out results in HTML tables. Default table is two columns wide, 193 with a white background.</dd> 194 195 <dt><code>-x <var><table>-attributes</var></code></dt> 196 <dd>String to use as attributes for <code><table></code>. Attributes 197 are inserted <code><table <var>here</var> ></code>.</dd> 198 199 <dt><code>-X <var>proxy</var>[:<var>port</var>]</code></dt> 200 <dd>Use a proxy server for the requests.</dd> 201 202 <dt><code>-y <var><tr>-attributes</var></code></dt> 203 <dd>String to use as attributes for <code><tr></code>.</dd> 204 205 <dt><code>-z <var><td>-attributes</var></code></dt> 206 <dd>String to use as attributes for <code><td></code>.</dd> 207 208 <dt><code>-Z <var>ciphersuite</var></code></dt> 209 <dd>Specify SSL/TLS cipher suite (See openssl ciphers).</dd> 210 </dl> 211 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> 212 <div class="section"> 213 <h2><a name="output" id="output">Description of output</a></h2> 214 <p>The following list describes the values returned by <code>ab</code>: 215 </p> 216 217 <dl> 218 <dt>Server Software</dt> 219 <dd>The value, if any, returned in the <var>server</var> HTTP header 220 of the first successful response. This includes all characters in the 221 header from beginning to the point a character with decimal value of 32 222 (most notably: a space or CR/LF) is detected.</dd> 223 224 <dt>Server Hostname</dt> 225 <dd>The DNS or IP address given on the command line</dd> 226 227 <dt>Server Port</dt> 228 <dd>The port to which ab is connecting. If no port is given on the 229 command line, this will default to 80 for http and 443 for 230 https.</dd> 231 232 <dt>SSL/TLS Protocol</dt> 233 <dd>The protocol parameters negotiated between the client and server. 234 This will only be printed if SSL is used.</dd> 235 236 <dt>Document Path</dt> 237 <dd>The request URI parsed from the command line string.</dd> 238 239 <dt>Document Length</dt> 240 <dd>This is size in bytes of the first succesfully returning document. 241 If the document length changes during testing, the response is 242 considered an error.</dd> 243 244 <dt>Concurrency Level</dt> 245 <dd>The number of concurrent clients used during the test</dd> 246 247 <dt>Time taken for tests</dt> 248 <dd>This is the time taken from the moment the first socket connection 249 is created to the moment the last response is recieved</dd> 250 251 <dt>Complete requests</dt> 252 <dd>The number of successful responses recieved</dd> 253 254 <dt>Failed requests</dt> 255 <dd>The number of requests that were considered a failure. If the 256 number is greater than zero, another line will be printed showing the 257 numer of requests that failed due to connecting, reading, incorrect 258 content length, or exceptions.</dd> 259 260 <dt>Write errors</dt> 261 <dd>The number of errors that failed during write (broken pipe).</dd> 262 263 <dt>Non-2xx responses</dt> 264 <dd>The number of responses that were not in the 200 series of response 265 codes. If all responses were 200, this field is not printed.</dd> 266 267 <dt>Keep-Alive requests</dt> 268 <dd>The number of connections that resulted in Keep-Alive requests</dd> 269 270 <dt>Total body sent</dt> 271 <dd>If configured to send data as part of the test, this is the total 272 number of bytes sent during the tests. This field is omitted if the test 273 did not include a body to send.</dd> 274 275 <dt>Total transferred</dt> 276 <dd>The total number of bytes received from the server. This number 277 is essentially the number of bytes sent over the wire.</dd> 278 279 <dt>HTML transferred</dt> 280 <dd>The total number of document bytes received from the server. This 281 number excludes bytes received in HTTP headers</dd> 282 283 <dt>Requests per second</dt> 284 <dd>This is the number of requests per second. This value is the result 285 of dividing the number of requests by the total time taken</dd> 286 287 <dt>Time per request</dt> 288 <dd>The average time spent per request. The first value is calculated 289 with the formula <code>concurrency * timetaken * 1000 / done</code> 290 while the second value is calculated with the formula 291 <code>timetaken * 1000 / done</code></dd> 292 293 <dt>Transfer rate</dt> 294 <dd>The rate of transfer as calculated by the formula 295 <code>totalread / 1024 / timetaken</code></dd> 296 </dl> 297 </div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div> 298 <div class="section"> 299 <h2><a name="bugs" id="bugs">Bugs</a></h2> 300 <p>There are various statically declared buffers of fixed length. Combined 301 with the lazy parsing of the command line arguments, the response headers 302 from the server and other external inputs, this might bite you.</p> 303 304 <p>It does not implement HTTP/1.x fully; only accepts some 'expected' forms 305 of responses. The rather heavy use of <code>strstr(3)</code> shows up top 306 in profile, which might indicate a performance problem; <em>i.e.</em>, you 307 would measure the <code>ab</code> performance rather than the server's.</p> 308 </div></div> 309 <div class="bottomlang"> 310 <p><span>Available Languages: </span><a href="../en/programs/ab.html" title="English"> en </a> | 311 <a href="../ko/programs/ab.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> | 312 <a href="../tr/programs/ab.html" hreflang="tr" rel="alternate" title="Türkçe"> tr </a></p> 313 </div><div class="top"><a href="#page-header"><img src="../images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div> 314 <script type="text/javascript"><!--//--><![CDATA[//><!-- 315 var comments_shortname = 'httpd'; 316 var comments_identifier = 'http://httpd.apache.org/docs/2.2/programs/ab.html'; 317 (function(w, d) { 318 if (w.location.hostname.toLowerCase() == "httpd.apache.org") { 319 d.write('<div id="comments_thread"><\/div>'); 320 var s = d.createElement('script'); 321 s.type = 'text/javascript'; 322 s.async = true; 323 s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier; 324 (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s); 325 } 326 else { 327 d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>'); 328 } 329 })(window, document); 330 //--><!]]></script></div><div id="footer"> 331 <p class="apache">Copyright 2017 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p> 332 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!-- 333 if (typeof(prettyPrint) !== 'undefined') { 334 prettyPrint(); 335 } 336 //--><!]]></script> 337 </body></html>