리눅스 명령어 - ab

2007. 4. 1. 16:16·Linux

ab : Apache HTTP Server Benchmarking tools 의 약자로 아파치서버의 응답속도를 측정하는 툴이다.

[사용 옵션들]
Options are:
    -n requests     Number of requests to perform (요청수)
    -c concurrency  Number of multiple requests to make (동시접속)
    -t timelimit    Seconds to max. wait for responses (시간제한)
    -p postfile     File containing data to POST
    -T content-type Content-type header for POSTing
    -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.
    -g filename     Output collected data to gnuplot format file.
    -e filename     Output CSV file with percentages served
    -s              Use httpS instead of HTTP (SSL)
    -h              Display usage information (this message)


먼저 ab의 버전을 확인해 보겠습니다.

windpyj@ubuntu:~$ ab -V
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.141 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
windpyj@ubuntu:~$


ex1) 네이버를 먼저 측정해 보았습니다.
-n 1 의 옵션은 지정된 URL을 한번 요청하여 결과를 보여 달라는 옵션입니다.

windpyj@ubuntu:~$ ab -n 1 http://www.naver.com/
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.141 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking www.naver.com (be patient).....done

Server Software:        Apache
Server Hostname:        www.naver.com
Server Port:            80
Document Path:          /
Document Length:        74123 bytes
Concurrency Level:      1
Time taken for tests:   0.345218 seconds
Complete requests:      1
Failed requests:        0
Write errors:           0
Total transferred:      74420 bytes
HTML transferred:       74123 bytes
Requests per second:    2.90 [#/sec] (mean)
Time per request:       345.218 [ms] (mean)
Time per request:       345.218 [ms] (mean, across all concurrent requests)
Transfer rate:          208.56 [Kbytes/sec] received
Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       46   46   0.0     46      46
Processing:   298  298   0.0    298     298
Waiting:       42   42   0.0     42      42
Total:        344  344   0.0    344     344
windpyj@ubuntu:~$


ex2) -c 30 옵션으로 측정해 보았습니다. -c 옵션은 다중세션을 측정하는 옵션입니다.
측정결과를 보시면 Concurreny Level 이 30으로 나옵니다.

windpyj@ubuntu:~$ ab -c 30 http://www.naver.com/
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.141 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/
Benchmarking www.naver.com (be patient).....done

Server Software:        Apache
Server Hostname:        www.naver.com
Server Port:            80
Document Path:          /
Document Length:        74093 bytes
Concurrency Level:      30
Time taken for tests:   0.435572 seconds
Complete requests:      1
Failed requests:        0
Write errors:           0
Total transferred:      502224 bytes
HTML transferred:       493314 bytes
Requests per second:    2.30 [#/sec] (mean)
Time per request:       13067.160 [ms] (mean)
Time per request:       435.572 [ms] (mean, across all concurrent requests)
Transfer rate:          1124.96 [Kbytes/sec] received
Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:       46   46   0.0     46      46
Processing:   388  388   0.0    388     388
Waiting:       48   48   0.0     48      48
Total:        434  434   0.0    434     434
windpyj@ubuntu:~$

'Linux' 카테고리의 다른 글

우분투 데스크탑 7.04 Feisty Fawn 설치  (2) 2007.05.16
우분투 서버 - DNS 구축 (bind 설치)  (0) 2007.04.01
리눅스 명령어 - free  (0) 2007.04.01
우분투 서버 - 호스트네임(hostname) 설정  (0) 2007.03.27
우분투 서버 - 네트워크 설정  (1) 2007.03.27
'Linux' 카테고리의 다른 글
  • 우분투 데스크탑 7.04 Feisty Fawn 설치
  • 우분투 서버 - DNS 구축 (bind 설치)
  • 리눅스 명령어 - free
  • 우분투 서버 - 호스트네임(hostname) 설정
somoly
somoly
About me.
  • somoly
    somoly.tistory.com
    somoly
  • 전체
    오늘
    어제
    • 전체 (55)
      • SpringBoot (8)
      • Kotlin (5)
      • Javascript (4)
      • 백엔드 (6)
      • Linux (25)
      • Windows (1)
      • IT (2)
      • FF14 (1)
      • 애니 (1)
      • Figure (1)
      • 회사생활 (1)
  • 블로그 메뉴

    • HOME
    • TAGS
    • MEDIA
    • LOCATION
    • GUESTBOOK
    • ADMIN
    • WRITE
  • 링크

    • [FF14] 5.0 (71-80) 제작 레벨링 매크로
    • [FF14] 갈론드벨
    • [FF14] FFLogs
    • [FF14] Ariyala 장비 시뮬레이터
    • [FF14] 낚시 도우미
    • [FF14] 인테리어 정보
    • [FF14] 의상 코디 정보
  • 공지사항

  • 인기 글

  • 태그

    동영상
    ubuntu
    HTTP
    Kotlin
    VirtualBox
    versioncomapre
    83인치
    javascript
    springboot
    77인치
    accesskey
    string methods
    리눅스
    utf-8
    우분투
    Spring
    jvminline
    dynamodb local
    설치
    exchage method
    tabulator
    종료
    30일전
    피규어
    최후의 재림
    부팅
    linux
    bcmod
    interactive table
    P2P
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.6
somoly
리눅스 명령어 - ab
상단으로

티스토리툴바