webbench安装使用

安装
# tar zxvf webbench-1.5.tar.gz
# cd webbench-1.5
# make && make install
cc -Wall -ggdb -W -O   -c -o webbench.o webbench.c
webbench.c: In function ‘alarm_handler’:
webbench.c:77: 警告:未使用的参数 ‘signal’
cc -Wall -ggdb -W -O  -o webbench webbench.o 
ctags *.c
install -s webbench /usr/local/bin
install -m 644 webbench.1 /usr/local/man/man1
install -d /usr/local/share/doc/webbench
install -m 644 debian/copyright /usr/local/share/doc/webbench
install -m 644 debian/changelog /usr/local/share/doc/webbench

(按照下面安装就好)

# install -s webbench /usr/local/bin


先创建目录,不然会报错

#mkdir /usr/local/man/man1 

# install -m 644 webbench.1 /usr/local/man/man1
# install -d /usr/local/share/doc/webbench
# install -m 644 debian/copyright /usr/local/share/doc/webbench
# install -m 644 debian/changelog /usr/local/share/doc/webbench
# webbench
webbench [option]... URL
  -f|--force               Don‘t wait for reply from server.
  -r|--reload              Send reload request - Pragma: no-cache.
  -t|--time <sec>          Run benchmark for <sec> seconds. Default 30.
  -p|--proxy <server:port> Use proxy server for request.
  -c|--clients <n>         Run <n> 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.


简的测试命令:

#webbench -c 800 -t 60 http://192.168.1.40/index.jsp

800 clients, running 60 sec.


Speed=78170 pages/min, 408272 bytes/sec.

Requests: 78170 susceed, 0 failed.


表示并发800,持续60秒,可以看出一分钟接受了78170次页面请求,每秒处理408272 bytes,没有失败


webbench安装使用,古老的榕树,5-wow.com

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。