AB apachebench Web Test Tool

Source: Internet
Author: User
Tags response code

apachebench Parameter description format: AB [options] [http://]hostname[:p Ort]/pathparameter Description:-N Requests number of requests to perform//The number of requests executed in the test session (the total number of times the page was visited for this test). By default, only one request is executed. -c concurrency number of multiple requests to make//the number of requests produced at one time (number of concurrent). The default is one at a time. -T TimeLimit Seconds to Max. Wait forResponses//the maximum number of seconds the test takes. Its internal implied value is-n 50000. It allows you to limit the testing of the server to a fixed total time. By default, there is no time limit. -p postfile File containing data to POST//A file that contains the data that needs to be post, such as "p1=1&p2=2". The method of use is-P 111.txt. (with-T)-T Content-type Content-type header forPOSTing//the Content-type header information used by the post data, such as-T "application/x-www-form-urlencoded". (with-P)-v verbosity how much troubleshooting info to print//set the verbosity of the display information –4 or greater displays header information, 3 or greater values can display a response code (404, 200, and so on), and 2 or greater values can display warnings and other information. -V Displays the version number and exits. -W Print outResultsinchHTML Tables//outputs the result in the format of an HTML table. By default, it is a table with a two-column width on a white background. -I use HEAD instead of GET//executes the head request instead of get. -X attributes String to insert asTable Attributes-Y attributes String to insert asTR Attributes-Z attributes String to insert astd or TH attributes-C attribute Add cookie, eg. -C "c1=1234, c2=2, c3=3"(repeatable)//-C Cookie-name=value attach a cookie to the request: line. Its typical form is a parameter pair of Name=value. This parameter can be repeated, separated by commas. Tip: You can use the session implementation principle to pass Jsessionid parameters, to achieve the function of maintaining the session, such as-C "c1=1234, c2=2, c3=3, jsessionid=Ff056cd16da9d71cb131c1d56f0319f8″. -H attribute Add arbitrary header line, eg. ' Accept-Encoding:gzip ' Inserted after all normal header lines. (repeatable)-a attribute Add Basic WWW authentication, the Attributesare a colon separated username and password.-P attribute Add Basic Proxy authentication, the Attributesare a colon separated username and password.//-P Proxy-auth-username:password provides a Basic authentication trust to a transit agent. The user name and password are separated by a: and sent in Base64 encoded form. This string is sent regardless of whether the server is required (that is, if the 401 authentication requirement code is sent). -X proxy:port ProxyServer and port number to use-V Print version number and exit-k use HTTP KeepAlive feature-d do not show percentiles served table.-S do not show confidence estimators and warnings.-g filename Output collected data to gnuplot format file.-e filename Output CSV file with percentages served-H Display usage information ( Thismessage)//-attributes The string that sets the property. There are various statically declared fixed-length buffers in the defect program. In addition, parsing of command-line arguments, the response headers of the server, and other external inputs can be very simple, which may have undesirable consequences. It does not realize the http/1.x completely; Accept only certain ' expected ' response formats. The frequent use of STRSTR (3) can lead to performance problems, i.e. you may be testing the performance of AB rather than the server. Many parameters, generally we use-C and-The n parameter is available. Example: AB-C the-N -http//192.163.1.26/

[Email protected] yum.repos.d]# ab-c 5000-n http://192.163.1.26/index.html
Ab:cannot use concurrency level greater than total number of requests

Reason:
Ulimit-a

Max User Processes 4573

Modify this session at slash time: only for this session, restart failed
Ulimit-u 65536
Permanent modification:
Vi/etc/security/limits.conf

* Soft Nofile 65536
* Hard Nofile 65536

AB apachebench Web Test Tool

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.