Chinaunix首页 | 论坛 | 博客
  • 博客访问: 8049853
  • 博文数量: 594
  • 博客积分: 13065
  • 博客等级: 上将
  • 技术积分: 10324
  • 用 户 组: 普通用户
  • 注册时间: 2008-03-26 16:44
个人简介

推荐: blog.csdn.net/aquester https://github.com/eyjian https://www.cnblogs.com/aquester http://blog.chinaunix.net/uid/20682147.html

文章分类

全部博文(594)

分类: LINUX

2009-02-23 23:30:36

由于我的VPS的服务器不是Apache,而且我也找不到ab测试工具。所以只好Google一下咯。发现一个参数少又精的压力测试工具,但是始终没有找到最新版本。只好从别的地方比较一下,然后选一个比较多人用的版本来咯,然后上传到自己的空间,防止以后这个文件又找不到了。

安装方法

wget
tar zxvf webbench-1.5.tar.gz
cd webbench-1.5
make && make install

压力测试举例

webbench -t 10 -c 1000

参数说明:-t 运行时间 -c 并发数
注意:如果不是文件名,URL地址后面一定要跟一个“/”,否则会出错!

详细参数如下:

webbench [option]… URL
-f|–force Don’t wait for reply from server.
-r|–reload Send reload request - Pragma: no-cache.
-t|–time Run benchmark for seconds. Default 30.
-p|–proxy Use proxy server for request.
-c|–clients Run 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.

阅读(4353) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~