apachebench

How to add http proxy for apachebench(ab)

倖福魔咒の 提交于 2019-12-22 10:01:21
问题 I want to grab http packets which ab sends or receives. So I add a http_proxy in shell command: $ export http_proxy=127.0.0.1:8888 Then I execute ab command: $ ab -c 1 -n 1 http://localhost/ Finally, my proxy(127.0.0.1:8888) failed to get http packets from ab. Is there any way to let ab access http via http_proxy? Here is my environment: Mac OSX 10.10.3 回答1: If you read about ab's help ab -h , you'll find that it supports an proxy option -X : -X proxy:port Proxyserver and port number to use

Apache benchmark multipart/form-data

落爺英雄遲暮 提交于 2019-12-18 18:24:10
问题 i'm facing a strange problem with apache benchmark post file. I need to stress a feature that handles file upload. So, I googled about, and found a post describing how to build a post file properly. Its contents looks like: --1234567 Content-Disposition: form-data; name="user_id" 3 --1234567 Content-Disposition: form-data; name="file"; filename="cf_login.png" Content-Type: image/png [base64 encoded file content] --1234567-- The ab line is this: $ ab -c 1 -n 5 -v 4 -T 'multipart/form-data;

How do I fix “ssl handshake failed” with ApacheBench?

喜夏-厌秋 提交于 2019-12-18 03:51:26
问题 When I use ApacheBench to test https, the error is returned, "ssl handshake failed". How can I use ApacheBench to test https? 回答1: ApacheBench doesn't seem to be capable of ignoring certificate problems (at least some of them) so I wrote this script: #!/bin/bash K=200; HTTPSA='https://192.168.1.103:443/' date +%M-%S-%N>wgetres.txt for (( c=1; c<=$K; c++ )) do wget --no-check-certificate --secure-protocol=SSLv3 --spider $HTTPSA done date +%M-%S-%N>>wgetres.txt It's not as precise as AB, but

How do I fix “ssl handshake failed” with ApacheBench?

心已入冬 提交于 2019-12-18 03:50:04
问题 When I use ApacheBench to test https, the error is returned, "ssl handshake failed". How can I use ApacheBench to test https? 回答1: ApacheBench doesn't seem to be capable of ignoring certificate problems (at least some of them) so I wrote this script: #!/bin/bash K=200; HTTPSA='https://192.168.1.103:443/' date +%M-%S-%N>wgetres.txt for (( c=1; c<=$K; c++ )) do wget --no-check-certificate --secure-protocol=SSLv3 --spider $HTTPSA done date +%M-%S-%N>>wgetres.txt It's not as precise as AB, but

How to install Apache Bench on Windows 7? [closed]

家住魔仙堡 提交于 2019-12-17 22:29:38
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I want to install Apache Bench on Windows, can someone tell me which MSI to get? I did install some MSI but it seems to have installed apache http server. I just need to run Apache Bench, as I am testing an IIS asp.net application. 回答1: It sounds like you don't want to install Apache, but you do want Apache

apr_socket_recv: An established connection was aborted by the software in your host machine

做~自己de王妃 提交于 2019-12-12 20:48:49
问题 I'm creating a small server using java.nio , but when trying to stress test it I keep getting messages about the connection being reset on the server side, or more specifically: apr_socket_recv: An established connection was aborted by the software in your host machine I've tried to narrow it down to the most simple of loops, but still no luck. I can get the error after a hundred or so connections, or maybe just after 1 or 2. Here's the server loop: byte[] response = ("HTTP/1.1 200 OK\r\n" +

Tomcat response time is increasing as concurrency is increased in apache bench

旧城冷巷雨未停 提交于 2019-12-11 22:36:13
问题 When I am increasing concurrency -c in ab (apache bench) then I am getting different response time. -c 99% 3 2ms 5 4ms 8 6ms If I increase -c further then response time will increase as well.My code is extremely simple, No thread starvation, no blocking, etc. Then why the response time is getting increased? I think that ab -c 8 means 8 simultaneous request would be made to http://localhost:8070/benchmark . So is it possible that requests are getting pooled at tomcat? If it is so then how can

problem with apachebench (ab) and transfer-encoding chunked

旧城冷巷雨未停 提交于 2019-12-11 17:54:32
问题 i am using apachebench (ab) to test a web server this problem is similar to this question. here is output from one request :: ab -c 1 -n 1 -v 5 -k http://localhost:8082/typealine 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)...INFO: POST header == --- GET /typealine HTTP/1.0 Connection: Keep-Alive Host:

tomcat performance monitoring in JavaMelody and ab

試著忘記壹切 提交于 2019-12-11 13:18:28
问题 I am new to JavaMelody and benchmark. I am using JavaMelody to monitor my Jersey Application in tomcat following https://dzone.com/articles/a-step-by-step-guide-to-tomcat-performance-monitor. My application setup: 4 docker containers setup by docker-compose: myapplication (tomcat, jersey application), kafka, postgres, zookeeper. I got the following details from javaMelody monitoring page: Host: 16a180e86bba@172.18.0.5 Java memory used: 784 Mb / 7,124 Mb ++++++++++++ Nb of http sessions: 0 Nb

Apache自带的ab压力测试工具用法详解

谁说胖子不能爱 提交于 2019-12-09 09:55:17
ab命令原理 Apache的ab命令模拟多线程并发请求,测试服务器负载压力,也可以测试nginx、lighthttp、IIS等其它Web服务器的压力。 ab命令对发出负载的计算机要求很低,既不会占用很多CPU,也不会占用太多的内存,但却会给目标服务器造成巨大的负载,因此是某些DDOS攻击之必备良药,老少皆宜。自己使用也须谨慎。否则一次上太多的负载,造成目标服务器直接因内存耗光死机,而不得不硬重启,得不偿失 下载安装: http://mirror.bit.edu.cn/apache//httpd/binaries/win32/?C=M;O=A 找到 httpd-2.2.21-win32-x86-no_ssl.msi windows版本官方只提供源码,这里可参考下载: 链接: https://pan.baidu.com/s/1ylrI7G5nSFu-LBlYgY0T3Q 提取码:uzmr 运行: 在Windows系统下,打开cmd命令行窗口,定位到apache安装目录的bin目录下 cd C:\Program Files (x86)\Apache Software Foundation\Apache2.2\bin 键入命令: ab -n 800 -c 800 http://192.168.0.10/ (-n发出800个请求,-c模拟800并发,相当800人同时访问,后面是测试url)