网站压力测试工具Webbench安装手记-Ubuntu

来源:互联网 发布:excel irr函数 sql实现 编辑:程序博客网 时间:2024/04/30 07:44

由于要搞网站压力测试就准备在ubuntu下安装webbench


首先webbench是依赖于ctags,在shell中只需输入ctags即知有没有安装,如果没有要先安装ctags
如果你的源中有ctags很容易

Shell代码  收藏代码
  1. sudo apt-get install ctags  

 

即可安装
我的源里没有,要手动:

 

Shell代码  收藏代码
  1. wget http://prdownloads.sourceforge.net/ctags/ctags-5.8.tar.gz  
  2. tar zxvf ctags-5.8.tar.gz  
  3. cd ctags-5.8  
  4. ./configure  
  5. make  
  6. sudo make install  

 
到此ctags安装完毕

下载webbench:

Shell代码  收藏代码
  1. wget http://www.linuxidc.com/system/systembak/webbench/webbench-1.5.tar.gz  
  2. tar zxvf webbench-1.5.tar.gz   
  3. make  
  4. sudo make install  

 

在MAKE的时候出现make: cc: Command not found这个错误

Linux上用GCC,需要安装gcc

即可安装成功

其中

ctags:469K
webbench:7.5K
真的感到linux软件的强大精悍呀

 

用法:

 

Shell代码  收藏代码
  1. webbench -c 100 -t 10 http://www.iteye.com/  

  

其中: 
-c表示并发数, 
-t表示时间(秒)

 注意url结尾一定要加上/

 

安装后发现其实apache自带的ab非常好用

Shell代码  收藏代码
  1. ab -c 1000 -n 100 http://www.iteye.com/index.php  
  2. 这个表示同时处理1000个请求并运行100次index.php文件.  
原创粉丝点击