您的位置:首页 > 运维架构 > Linux

Linux下压力测试工具推荐:WebBench

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

安装方法

wget http://www.nicelover.cn/wp-content/uploads/2008/08/webbench-1.5.tar.gz tar zxvf webbench-1.5.tar.gz
cd webbench-1.5
make && make install

压力测试举例

webbench -t 10 -c 1000 http://127.0.0.1/

参数说明:-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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: