Webbench是知名的网站压力测试工具,它是由Lionbridge公司开发。Web Bench 是用于对 WWW 或代理服务器进行基准测试的非常简单的工具。使用 fork() 模拟多个客户端,可以使用 HTTP/0.9-HTTP/1.1 请求。这个基准测试不是很现实,但它可以测试您的 HTTPD 是否真的可以一次处理那么多客户端(尝试运行一些 CGI)而无需关闭您的机器。
Webbench能测试处在相同硬件上,不同服务的性能以及不同硬件上同一个服务的运行状况。webbench的标准测试可以向我们展示服务器的两项内容:每秒钟相应请求数和每秒钟传输数据量。webbench不但能具有便准静态页面的测试能力,还能对动态页面(ASP,PHP,JAVA,CGI)进 行测试的能力。还有就是他支持对含有SSL的安全网站例如电子商务网站进行静态或动态的性能测试。Webbench最多可以模拟3万个并发连接去测试网站的负载能力。
[root@test1 local]# wget http://soft.vpser.net/test/webbench/webbench-1.5.tar.gz
或者在CSDN下载webbench下载链接
[root@test1 local]# tar -zxvf webbench-1.5.tar.gz
webbench-1.5/
webbench-1.5/webbench.1
webbench-1.5/socket.c
webbench-1.5/webbench.c
webbench-1.5/Makefile
webbench-1.5/debian/
webbench-1.5/debian/rules
webbench-1.5/debian/dirs
webbench-1.5/debian/copyright
webbench-1.5/debian/control
webbench-1.5/debian/changelog
webbench-1.5/COPYRIGHT
webbench-1.5/ChangeLog
[root@test1 webbench-1.5]# make && make install
cc -Wall -ggdb -W -O -c -o webbench.o webbench.c
webbench.c: In function ‘alarm_handler’:
webbench.c:77:31: warning: unused parameter ‘signal’ [-Wunused-parameter]
static void alarm_handler(int signal)
^
cc -Wall -ggdb -W -O -o webbench webbench.o
ctags *.c
/bin/sh: ctags: command not found
make: [tags] Error 127 (ignored)
install -s webbench /usr/local/bin
install -m 644 webbench.1 /usr/local/man/man1
install -d /usr/local/share/doc/webbench
install -m 644 debian/copyright /usr/local/share/doc/webbench
install -m 644 debian/changelog /usr/local/share/doc/webbench
[root@test1 webbench-1.5]# which webbench
/usr/local/bin/webbench
[root@test1 webbench-1.5]# webbench --help
webbench [option]… URL
-f|–force Don’t wait for reply from server.
-r|–reload Send reload request - Pragma: no-cache.
-t|–time <sec> Run benchmark for seconds. Default 30.
-p|–proxy <server:port> Use proxy server for request.
-c|–clients <n> Run HTTP clients at once. Default one.
-9|–http09 Use HTTP/0.9 style requests.
-1|–http10 Use HTTP/1.0 protocol.
-2|–http11 Use HTTP/1.1 protocol.
–get Use GET request method.
–head Use HEAD request method.
–options Use OPTIONS request method.
–trace Use TRACE request method.
-?|-h|–help This information.
-V|–version Display program version.
webbench [option]… URL
[root@test1 local]# webbench -c 500 -t 60 http://192.168.0.213:8098/dist/#/index?id=7e77ad5dab52b8b29a5de3ed985b1535
Webbench - Simple Web Benchmark 1.5
Copyright © Radim Kolar 1997-2004, GPL Open Source Software.
Benchmarking: GET http://192.168.0.213:8098/dist/#/index?id=7e77ad5dab52b8b29a5de3ed985b1535
500 clients, running 60 sec.
Speed=211544 pages/min, 373727 bytes/sec.
Requests: 211544 susceed, 0 failed.
[root@test1 local]# webbench -c 5000 -t 60 http://192.168.0.213:8098/dist/#/index?id=7e77ad5dab52b8b29a5de3ed985b1535
Webbench - Simple Web Benchmark 1.5
Copyright © Radim Kolar 1997-2004, GPL Open Source Software.
Benchmarking: GET http://192.168.0.213:8098/dist/#/index?id=7e77ad5dab52b8b29a5de3ed985b1535
5000 clients, running 60 sec.
Speed=203363 pages/min, 359218 bytes/sec.
Requests: 203332 susceed, 31 failed.
[root@test1 local]# webbench -c 30000 -f -t 60 http://192.168.0.213:8098/dist/#/index?id=7e77ad5dab52b8b29a5de3ed985b1535
Webbench - Simple Web Benchmark 1.5
Copyright © Radim Kolar 1997-2004, GPL Open Source Software.
Benchmarking: GET http://192.168.0.213:8098/dist/#/index?id=7e77ad5dab52b8b29a5de3ed985b1535
30000 clients, running 60 sec, early socket close.
problems forking worker no. 29631
fork failed.: Resource temporarily unavailable
如果您发现该资源为电子书等存在侵权的资源或对该资源描述不正确等,可点击“私信”按钮向作者进行反馈;如作者无回复可进行平台仲裁,我们会在第一时间进行处理!
添加我为好友,拉您入交流群!
请使用微信扫一扫!