Examples of AB use:
To perform 1000 connection, 20 times concurrent (parallel, simultaneous):
Syntax: Ab-n 1000-c http://localhost/index.php
AB Parameters:
Usage:/usr/sbin/ab [Options] [Http[s]://]hostname[:p ort]/path
Options are:
§-n Requests Numberof requests to perform§-C concurrency Numberof multiple requests to make§-T TimeLimit Seconds toMax. Wait forresponses§-P PostfileFilecontaing data to post§-T Content-type Content-typeHeader forposting§-V verbosity how much troubleshooting info toPrint§ -WPrintOut results in HTML tables§-I. UseHEAD instead of get§-X AttributesStringTo insert asTable Attributes§-Y attributesStringTo insert asTR attributes§-Z AttributesStringTo insert astd or Th attributes§-C attribute Add cookie, eg. ' apache=1234 '(repeatable) §-H Attribute Add arbitraryHeaderLine, eg. ' Accept-encoding:zop '§inserted after all normalHeaderLines.(repeatable) §-A attribute Add Basic WWW authentication,The attributes§are a colon separated username and password.§ -P attribute Add Basic Proxy authentication,The attributes§are a colon separated username and password.§ -X Proxy:port ProxyServer and port NumberTo Use§ -VPrintVersion NumberandExit§ -K UseHTTP KeepAlive feature§-D DoNot show percentiles served table.§ -S DoNot show confidence estimators and warnings.§ -G filename Output collected data to gnuplot formatfile.§ -e filename Output CSVfileWith percentages served§-S UseHttpS instead of HTTP (SSL) §-H Display Usage information (this message)
Appache AB Test High concurrency