-attributes ] [ -z -attributes ] [http://]hostâ
name[:port]/path
```
### é项
```shell
-A auth-username:password
# æ¯æåºæ¬çéªè¯è¯ä¹¦,ç¨æ·ååå¯ç ä¹é´ä½¿ç¨"åå·" :
# åéå¼,abå°ä»¥æææ¹å¼ä¼ éè¿å».ä¸ç®¡æå¡å¨æ¯ä¸æ¯éè¦
# ,ä¹å°±æ¯è¯´ä½ çæå¡å¨éè¦æ¯æ401认è¯.
-c concurrency
# åæ¶åæå¡å¨ç«¯åéçè¯·æ±æ°ç®ï¼é»è®¤ç¶æä¸æ¯ä¸æ¬¡ åªæ§è¡ä¸ä¸ªhttp请æ±.
-C cookie-name=value
# Add a Cookie: line to the request. The argument is typically in the
# form of a name=value pair. This field is repeatable.
-d # Do not display the "percentage served within XX [ms] table".
# (legacy support).
-e csv-file
# Write a Comma separated value (CSV) file which contains for each
# percentage (from 1% to 100%) the time (in milli seconds) it took to
# serve that percentage of the requests. This is usually more useful
# than the 'gnuplot' file; as the results are already 'binned'.
-g gnuplot-file
# Write all measured values out as a 'gnuplot' or TSV (Tab separate
# values) file. This file can easily be imported into packages like
# Gnuplot, IDL, Mathematica, Igor or even Excell. The labels are on
# the first line of the file.
-h # æ¾ç¤ºä½¿ç¨è¯´æ
-H custom-header
# å请æ±å
追å éå çæ é¢å串.æ¤åæ°åºè¯¥æ¯ææçæ é¢ è¡(header
# line)å½¢å¼,é常使ç¨åå·":"æ¥åéææé
对 (valid pair)ä¾å¦ 'Accept-
# Encoding: zip/zop;8 bit';
-i # 使ç¨ä¸ä¸ª http 头(HEAD) æ¥æ¿æ¢ GETæ¹æ³.ä¸å¯ä»¥æºå
¥POST æ¹æ³
-k # å
许http KeepAlive ï¼ä¹å°±æ¯è¯´æ§è¡å¤ä¸ªè¯·æ±å¨ä¸ä¸ª http
# ä¼è¯å½ä¸ï¼é»è®¤æ¯ä¸å
许çä¹å°±æ¯no KeepAliveå¦;)
-n requests
# æ§è¡ä¸æ¬¡æµè¯ä¼è¯çæ¶åæååºçè¯·æ±æ°ç®,é»è®¤æ¯æ§è¡ä¸ä¸ªåä¸ç请æ±
# å½ç¶äºè¿æ ·çæµè¯ç»æä¹å°±æ²¡ä»ä¹æä¹äº
-p POST-file
# æµè¯ç¨åºä¹å°±æ¯ab,å°åApache serveråé带æHTTP POST ç请æ±.
-P proxy-auth-username:password
# å½éè¦éè¿ä»£çæµè¯ä¸å° HTTP æå¡å¨çæ¶åèä½ ç代ç
# åéè¦ç¨æ·åå¯ç éªè¯,è¿æ¶ä½ å¯ä»¥ä½¿ç¨è¿ä¸ªé项,åæ ·
# ç¨æ·åä¸å¯ç ä¹é´ä½¿ç¨åå·":"åéå¼,abå°ä¹ä»¥ææçæ¹å¼
# åéåºå»,å½ç¶,åææ¯ä½ çä»£çæ¯å¤äº407认è¯ç¶æç
-q # When processing more than 150 requests, ab outputs a progress count
# on stderr every 10% or 100 requests or so. The -q flag will supâ
# press these messages.
-s # When compiled in (ab -h will show you) use the SSL protected https
# rather than the http protocol. This feature is experimental and
# very rudimentary. You probably do not want to use it.
-S # Do not display the median and standard deviation values, nor disâ
# play the warning/error messages when the average and median are
# more than one or two times the standard deviation apart. And deâ
# fault to the min/avg/max values. (legacy support).
-t timelimit
# 设置æµè¯çæ¶é´çé¿çï¼ä½¿ç¨è¿ä¸ªé项abå°èªå¨è®¾ç½®
# æµè¯è¯·æ±ä¼è¯æ°ç®ä¸º50000ï¼ç¶åä»¥ä½ è®¾ç½®çæ¶é´ä¸º
# åºå®å¨æ.é»è®¤ç¶æä¸æ¯æ²¡ææ¶éçï¼ä¹å°±æ¯ç´å°å®æ
# ä½ æè®¾ç½®çè¯·æ±æ°ç®ä¸ºæ¢.
-T content-type
# å
å®¹ç±»åæ å¤´,使ç¨å¨POSTæ°æ®çæ¶å.
-v verbosity
# 设置åä½çº§å«,4级æå°åºæ¯ä¸ªè¯·æ±æ 头ç详ç»ä¿¡æ¯,
# 3级æå°åºååºä»£ç (ä¾å¦,404,200),2级æå°åºè¦å ä¿¡æ¯åæç¤ºæ¶æ¯
-V # æ¾ç¤ºçæ¬å·å¹¶ä¸éåº
-w # æå°è¾åºç»æå°HTML表ä¸. é»è®¤ç表æ¯ä¸¤ånè¡ç½åºé»æ¡
-x -attributes
# 使ç¨åä¸²æ¥æè¿°è¡¨ç屿§,è¯¥å±æ§å串åºè¯¥æå
¥å°
-X proxy[:port]
# Use a proxy server for the requests.
-y -attributes
# ç¨äºçæhtmlè¡¨æ ¼æ¯è¡ç屿§å ( )
-z | -attributes
# ç¨äºçæhtmlè¡¨æ ¼æ¯åç屿§å ( | )
```
### åæ°
主æºï¼è¢«æµè¯ä¸»æºã
| |