Webbench是Linux下的一個網站壓力測試工具,最多可以模擬3萬個並發連接去測試網站的負載能力. 它是由Lionbridge公司開發。
之前整理的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 的頁面測試,貌似沒有什么問題。
------------------------------------------------------------------------------
Blog: http://blog.csdn.net/tianlesoftware
網上資源: http://tianlesoftware.download.csdn.net
相關視頻:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx
DBA1 群:62697716(滿); DBA2 群:62697977(滿)
DBA3 群:62697850 DBA 超級群:63306533;
聊天 群:40132017
--加群需要在備注說明Oracle表空間和數據文件的關系,否則拒絕申請