System Engineering/Linux
Tools: ab
sonkadak
2018. 8. 30. 10:16
ab: Linux web test tool
ref: http://faq.hostway.co.kr/?mid=Linux_WEB&sort_index=readed_count&document_srl=1235&order_type=desc
Apache web server 등이 초당 얼마나 많은 요청을 처리할 수 있는지 측정하는 툴이다
Options
-k |
HTTP Keep-Alive 기능 사용 |
-i |
GET 대신 HEAD 사용 |
-n [REQUEST_COUNT] |
측정할 요청 수 지정 기본값 1 |
-t [TIME_LIMIT_SEC] |
측정할 시간 지정. 미지정시 세션에 대하여 50000개의 요청 자동 정의 |
-c [SIMULTANEOUSLY_REQUEST_COUNT] |
동시 요청 수 지정. 기본값 1 |
-p [FILE] |
POST 요청 및 파일 지정 |
-A USER:PASS |
사용자 인증 |
-p USER:PASS |
프록시 서버로의 인증 |
-C COOKIE=VALUE |
요청에 쿠키 추가 |
-H [HEADER] |
요청에 임의 헤더 추가 |
-T [CONTENT-TYPE] |
POST 데이터의 content-type 헤더 지정 |
-v |
출력 레벨 지정. 4: 결가괎 상단에 헤더 출력, 3: 결과 상단에 응답코드 출력, 2: 경고,정보 출력 |
-w |
HTML table로 결과 출력 |
-x <table [ATTRIBUTES]> |
HTML <table>에 대한 속성 지정 |
-y <tr [ATT]> |
<tr> 속성 지정 |
-z <td [ATT]> |
<td> 속성 지정 |
-V |
버전 정보 출력 후 종료 |
-h |
help |
Examples
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | [root@LOCALHOST ~]# ab -n 100 -c 10 http://localhost/ This is ApacheBench, Version 2.3 <$Revision: 655654 $> Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking localhost (be patient).....done Server Software: Apache/2.2.15 Server Hostname: localhost Server Port: 80 Document Path: / Document Length: 4961 bytes Concurrency Level: 10 Time taken for tests: 0.014 seconds Complete requests: 100 Failed requests: 0 Write errors: 0 Non-2xx responses: 103 Total transferred: 531377 bytes HTML transferred: 510983 bytes Requests per second: 7204.09 [#/sec] (mean) Time per request: 1.388 [ms] (mean) Time per request: 0.139 [ms] (mean, across all concurrent requests) Transfer rate: 37383.68 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.2 0 1 Processing: 0 1 0.4 1 2 Waiting: 0 1 0.4 1 2 Total: 1 1 0.3 1 2 Percentage of the requests served within a certain time (ms) 50% 1 66% 1 75% 1 80% 1 90% 2 95% 2 98% 2 99% 2 100% 2 (longest request) | cs |