webbench最多可以模拟3萬個并發連接配接去測試網站的負載能力 安裝: wget http://blog.s135.com/soft/linux/webbench/webbench-1.5.tar.gz tar zxvf webbench-1.5.tar.gz cd webbench-1.5 make && make install 使用: webbench -c 500 -t 30 http://127.0.0.1/test.jpg 參數說明:-c表示并發數,-t表示時間(秒) 結果: web# webbench -c 500 -t 30 http://10.122.82.243:/news/index.php Webbench - Simple Web Benchmark 1.5 Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software. Benchmarking: GET http://10.122.82.243:/news/index.php 500 clients, running 30 sec. Speed=1274 pages/min, 566020 bytes/sec. Requests: 637 susceed, 0 failed. |
網站壓力測試工具 webbench 安裝配置
轉自:http://www.reistlin.com/blog/84
參考文章:http://blog.s135.com/post/288/(張宴)
官方網站:http://home.tiscali.cz/~cz210552/webbench.html
1,下載下傳,解壓縮
reistlin:~# wget http://home.tiscali.cz/~cz210552/distfiles/webbench-1.5.tar.gz reistlin:~# tar zxvf webbench-1.5.tar.gz reistlin:~# cd webbench-1.5
2,配置編譯檔案:Makefile 自定義安裝路徑
reistlin:~# vim Makefile # 自定義安裝路徑,預設安裝路徑:/usr/local/ PREFIX?= /home/reistlin/webbench
3,安裝 ctags
reistlin:~# apt-get install ctags
或者下載下傳 ctags-5.8.tar.gz 編譯安裝
reistlin:~# wget http://prdownloads.sourceforge.net/ctags/ctags-5.8.tar.gz
注意!如果不安裝 ctags make 編譯會報錯:/bin/sh: ctags: command not found
ctags *.c /bin/sh: ctags: command not found make: [tags] Error 127 (ignored)
4,編譯,編譯安裝
reistlin:~# make reistlin:~# make install
5,make install 如果出現錯誤提示:No such file or directory
install -m 644 webbench.1 /home/reistlin/webbench/man/man1 install: cannot create regular file `/home/reistlin/webbench/man/man1': No such file or directory make: *** [install] Error 1
使用 mkdir -p 手動建立目錄:
reistlin:~# mkdir -p /home/reistlin/webbench/man/man1
reistlin:/home/reistlin/webbench# ln -s ./bin webbench
6,網站,Web壓力測試:
reistlin:~# ./webbench -c 500 -t 30 http://www.reistlin.com/ Webbench - Simple Web Benchmark 1.5 Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software. Benchmarking: GET http://www.reistlin.com/ 500 clients, running 30 sec. Speed=122530 pages/min, 1065157 bytes/sec. Requests: 61259 susceed, 6 failed.