網站壓力測試工具webbench安裝與使用

來源:互聯網
上載者:User


webbench是有名的網站壓力測試工具,它是由 Lionbridge公司開發。

webbench最多可以類比3萬個並發串連去測試網站的負載能力。

webbench能測試處在相同硬體上,不同服務的效能以及不同硬體上同一個服務的健全狀態。

webbench的標準測試可以向我們展示伺服器的兩項內容:每秒鐘相應請求數和每秒鐘傳輸資料量。

webbench不但能具有便准靜態頁面的測試能力,還能對動態網頁面(ASP,PHP,JAVA,CGI)進行測試的能力。還有就是他支援對含有SSL的安全網站例如電子商務網站進行靜態或動態效能測試。


官方網址:http://home.tiscali.cz/~cz210552/webbench_cz.html

下載地址:http://home.tiscali.cz/~cz210552/distfiles/webbench-1.5.tar.gz

適用於Linux系統

編譯安裝:

1.linux下使用wget下載遠程webbench檔案

wget http://home.tiscali.cz/~cz210552/distfiles/webbench-1.5.tar.gz

2.tar解壓要編譯的檔案

tar zxvf webbench-1.5.tar.gz

3.編譯原始碼和安裝檔案

cd webbench-1.5

vim Makefile (自訂安裝路徑,PREFIX?= /opt/webbench/)

make && make install

 

CentOS 在安裝時會報如下錯誤
ctags *.c 
/bin/sh: ctags: command not found 
make: [tags] Error 127 (ignored)

意思是說缺少ctags命令

安裝 ctags
wget http://prdownloads.sourceforge.net/ctags/ctags-5.8.tar.gz

cd ctags-5.8
./configure && make && make install

 
PS2: CentOS 在安裝時會報如下錯誤
ctags *.c 
install -s webbench /opt/webbench/bin    
install -m 644 webbench.1 /opt/webbench/man/man1     
install: cannot create regular file `/opt/webbench/man/man1': No such file or directory 
make: *** [install] Error 1 

只要在安裝目錄/opt/webbench/下  建立/man/man1即可

cd /opt/webbench/

mkdir man

cd man

mkdir man1

 

使用方法:

webbench -c 500 -t 30 http://127.0.0.1/index.html

參數說明:-c表示並發數,-t表示時間(秒)

 

測試結果:

Webbench – Simple Web Benchmark 1.5

Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.

Benchmarking: GET http://127.0.0.1/index.html

500 clients, running 30 sec.

Speed=3000 pages/min, 11614212 bytes/sec.

Requests: 1615 susceed, 0 failed

每秒鐘相應請求數:3000/60= 50 pages/sec

每秒鐘傳輸資料量:11614212 bytes/sec

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.