网站压力测试软件WebBench的安装与调试
(2011-09-05 18:56:03)
标签:
webbenchlinux压力测试it |
分类: linux那些事 |
1.编译安装:
wget
http://blog.s135.com/soft/linux/webbench/webbench-1.5.tar.gz
tar zxvf webbench-1.5.tar.gz
cd webbench-1.5
make && make install
注:wget
和 curl是linux自带的网络下载软件,如果要在windows下是使用需下载其windows版本的
配置:
2.配置编译文件:Makefile 自定义安装路径
reistlin:~# vim Makefile
# 自定义安装路径,默认安装路径:/usr/local/
PREFIX?= /home/reistlin/webbench
建议,为方便以后调用,可以做一个 symbolic links:
reistlin:/home/reistlin/webbench# ln -s ./bin webbench
2.出现错误以及解决方法
1>安装 ctags
reistlin:~# apt-get install ctags
或者下载 ctags-5.8.tar.gz 编译安装
reistlin:~# wget http://prdownloads.sourceforge.net/ctags/ctags-5.8.tar.gz
注意!如果不安装 ctags make 编译会报错:/bin/sh: ctags: command not found
ctags *.c
/bin/sh: ctags: command not found
make: [tags] Error 127 (ignored)
2>编译,编译安装
reistlin:~# make
reistlin:~# make install
5,make install 如果出现错误提示:No such file or directory
install -m 644 webbench.1 /home/reistlin/webbench/man/man1
install: cannot create regular file `/home/reistlin/webbench/man/man1': No such file or directory
make: *** [install] Error 1
需 mkdir -p 手动建立目录:
reistlin:~# mkdir -p /home/reistlin/webbench/man/man1
3>make Nothing to be done for 'all'
这句提示是说明你已经这句提示是说明你已经编译好了,而且没有对代码进行任何改动。编译好了,而且没有对代码进行任何改动。
最后,重新执行 make install 完成安装。
注(安装成功后出现):
[root@new-host-2 webbench-1.5]# make install
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
3.网站,Web压力测试:
reistlin:~# ./webbench -c 500 -t 30 http://www.reistlin.com/
注:是在安装目录下的./webbench
之后出现表示安装和测试成功:
Webbench - Simple Web Benchmark 1.5
Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.
Benchmarking: GET http://www.reistlin.com/
500 clients, running 30 sec.
Speed=122530 pages/min, 1065157 bytes/sec.
Requests: 61259 susceed, 6 failed.