티스토리 뷰

___리눅스

[http] ab tools

변군 변군이글루 2020. 8. 4. 01:23

ab tools

ab 버전

$ ab -V
This is ApacheBench, Version 2.3 <$Revision: 1874286 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

 

ab commands

$ ab -h
Usage: ab [options] [http[s]://]hostname[:port]/path
Options are:
    -n requests     Number of requests to perform
    -c concurrency  Number of multiple requests to make at a time
    -t timelimit    Seconds to max. to spend on benchmarking
                    This implies -n 50000
    -s timeout      Seconds to max. wait for each response
                    Default is 30 seconds
    -b windowsize   Size of TCP send/receive buffer, in bytes
    -B address      Address to bind to when making outgoing connections
    -p postfile     File containing data to POST. Remember also to set -T
    -u putfile      File containing data to PUT. Remember also to set -T
    -T content-type Content-type header to use for POST/PUT data, eg.
                    'application/x-www-form-urlencoded'
                    Default is 'text/plain'
    -v verbosity    How much troubleshooting info to print
    -w              Print out results in HTML tables
    -i              Use HEAD instead of GET
    -x attributes   String to insert as table attributes
    -y attributes   String to insert as tr attributes
    -z attributes   String to insert as td or th attributes
    -C attribute    Add cookie, eg. 'Apache=1234'. (repeatable)
    -H attribute    Add Arbitrary header line, eg. 'Accept-Encoding: gzip'
                    Inserted after all normal header lines. (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 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.
    -q              Do not show progress when doing more than 150 requests
    -l              Accept variable document length (use this for dynamic pages)
    -g filename     Output collected data to gnuplot format file.
    -e filename     Output CSV file with percentages served
    -r              Don't exit on socket receive errors.
    -m method       Method name
    -h              Display usage information (this message)
    -I              Disable TLS Server Name Indication (SNI) extension
    -Z ciphersuite  Specify SSL/TLS cipher suite (See openssl ciphers)
    -f protocol     Specify SSL/TLS protocol
                    (SSL3, TLS1, TLS1.1, TLS1.2 or ALL)
    -E certfile     Specify optional client certificate chain and private key

 

ab tools 설치

ubuntu

apt install apache2-utils

 

centos / amzn2

yum install httpd-tools

 

ab 테스트 명령어

###ab -c 클라이언트수 -n 요청수 -t 시간 URL

$ ab -c 1 -n 10 https://www.google.com/
This is ApacheBench, Version 2.3 <$Revision: 1874286 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking www.google.com (be patient).....done


Server Software:        gws
Server Hostname:        www.google.com
Server Port:            443
SSL/TLS Protocol:       TLSv1.2,ECDHE-ECDSA-AES128-GCM-SHA256,256,128
Server Temp Key:        ECDH P-256 256 bits
TLS Server Name:        www.google.com

Document Path:          /
Document Length:        13054 bytes

Concurrency Level:      1
Time taken for tests:   2.426 seconds
Complete requests:      10
Failed requests:        9
   (Connect: 0, Receive: 0, Length: 9, Exceptions: 0)
Total transferred:      139652 bytes
HTML transferred:       130582 bytes
Requests per second:    4.12 [#/sec] (mean)
Time per request:       242.585 [ms] (mean)
Time per request:       242.585 [ms] (mean, across all concurrent requests)
Transfer rate:          56.22 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:      129  133   1.8    134     134
Processing:   105  110   3.3    110     115
Waiting:      100  104   3.4    104     111
Total:        237  243   3.8    244     250

Percentage of the requests served within a certain time (ms)
  50%    244
  66%    244
  75%    244
  80%    246
  90%    250
  95%    250
  98%    250
  99%    250
 100%    250 (longest request)

 

'___리눅스' 카테고리의 다른 글

[linux] jmeter 설치  (0) 2020.08.19
[linux] ssh 접속 시간 체크  (0) 2020.08.04
[http] ab tools  (0) 2020.08.04
[docker] docker install  (0) 2020.07.26
[ubuntu] snap package 사용 방법  (0) 2020.07.26
[nginx] nginx-module-vts 모듈 추가  (0) 2020.07.21
댓글
댓글쓰기 폼