title: 压力测试工具webbench
date: 2020-07-21 10:41:00
categories:
- 工具
tags: - webbench
- 压力测试工具
系统信息
CentOS 8.2 64位
安装过程
wget http://home.tiscali.cz/~cz210552/distfiles/webbench-1.5.tar.gz
tar -zxvf webbench-1.5.tar.gz
cd webbench-1.5
make && make install
遇到问题:
webbench.c:21:10: fatal error: rpc/types.h: No such file or directory
:- 解决办法:
cp /usr/include/sys/types.h /usr/include/rpc/
- 解决办法:
/bin/sh: ctags: command not found make: [Makefile:12: tags] Error 127 (ignored)
:- 解决办法:
yum -y install ctags
- 解决办法:
install: cannot create regular file '/usr/local/man/man1': No such file or directory
:- 解决办法:
mkdir /usr/local/man
- 解决办法:
使用
webbench -c 1000 -t 60 http://192.168.80.157/phpinfo.php
webbench [option]... URL
-f|--force Don't wait for reply from server. // 不要等待服务器的回复.
-r|--reload Send reload request - Pragma: no-cache. // 发送重新加载请求-语法: no-cache.
-t|--time <sec> Run benchmark for <sec> seconds. Default 30. // 运行基准测试<sec>秒。 默认30.
-p|--proxy <server:port> Use proxy server for request. // 使用proxy服务进行请求.
-c|--clients <n> Run <n> HTTP clients at once. Default one. // 一次运行<n> HTTP客户端。 默认一个.
-9|--http09 Use HTTP/0.9 style requests. // Use HTTP/0.9 样式请求.
-1|--http10 Use HTTP/1.0 protocol. // Use HTTP/1.0 协议.
-2|--http11 Use HTTP/1.1 protocol. // Use HTTP/1.1 协议.
--get Use GET request method. // 使用GET请求方法.
--head Use HEAD request method. // 使用HEAD请求方法.
--options Use OPTIONS request method. // 使用OPTIONS请求方法.
--trace Use TRACE request method. // 使用TRACE请求方法.
-?|-h|--help This information.
-V|--version Display program version.
另外:不支持
https
,只支持http
。