之前整理的Apach AB 测试工具介绍,参考我的Blog:
Web 压力测试工具 --Apache AB
http://blog.csdn.net/tianlesoftware/archive/2010/11/23/6028577.aspx
Webbech 能测试处在相同硬件上,不同服务的性能以及不同硬件上同一个服务的运行状况。webBech的标准测试可以向我们展示服务器的两项内容:每秒钟相应请求数和每秒钟传输数据量。
Webbench不但能具有便准静态页面的测试能力,还能对动态页面(ASP,PHP,JAVA,CGI)进行测试的能力。还有就是他支持对含有SSL的安全网站例如电子商务网站进行静态或动态的性能测试。
Google了一会,没有找到相关的官网下载地址,只能从其他地方下载 WebBench 软件。
使用示例:
下载:
#wget http://home.tiscali.cz/~cz210552/distfiles/webbench-1.5.tar.gz
--2010-11-23 -- http://home.tiscali.cz/~cz210552/distfiles/webbench-1.5.tar.gz
Resolving home.tiscali.cz... 195.146.100.18
Connecting to home.tiscali.cz|195.146.100.18|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7675 (7.5K) [application/x-tar]
Saving to: `webbench-1.5.tar.gz'
100%[==========================================================>] 7,675 24.9K/s in 0.3s
2010-11-23 00:32:57 (24.9 KB/s) - `webbench-1.5.tar.gz' saved [7675/7675]
[root@centos tmp]# ls
webbench-1.5.tar.gz
--解压缩
[root@centos tmp]# 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@centos tmp]# cd webbench-1.5
[root@centos webbench-1.5]# ls
ChangeLog COPYRIGHT debian Makefile socket.c webbench.1 webbench.c
--编译程序
[root@centos tmp]# make
cc -Wall -ggdb -W -O -c -o webbench.o webbench.c
webbench.c:77: warning: unused parameter ’signal’
cc -Wall -ggdb -W -O -o webbench webbench.o
ctags *.c
-- 安装
[root@centos webbench-1.5]# mkdir /usr/local/man
-- 创建相关目录,不然install 时会报错
[root@centos webbench-1.5]# make install
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@centos 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 <sec> seconds. Default 30.
-p|--proxy <server:port> Use proxy server for request.
-c|--clients <n> Run <n> 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 -c 100 -t 30 http://support.qq.com/discuss/498_1.shtml
--参数说明:-c表示并发数,-t表示时间(秒)
Webbench - Simple Web Benchmark 1.5
Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.
Benchmarking: GET http://support.qq.com/discuss/498_1.shtml
100 clients, running 30 sec.
Speed=648 pages/min, 278829 bytes/sec.
Requests: 324 susceed, 0 failed.
小结:
上次用自己的blog测,把blog 都搞死了,今天用QQ 的页面测试,貌似没有什么问题。