网站制作学习网Linux→正文:linux高并发测试软件webbench
字体:

linux高并发测试软件webbench

Linux 2012/5/9 14:48:15  点击:不统计


在张晏的博客里看到了webbench的介绍,拿过来用用,并写了这篇日志,有需要的拿去共

同进步。
这里张晏提到了一个高并发测试软件,据他说比apache的ab好不少,下面安装测试一下
首先,在网上下载一个webbench-1.5的tar.gz的压缩包大概也就8k左右。
进入到linux解压
[root@localhost pub]# tar -zxvf webbench-1.5.tar.tar
webbench-1.5/
webbench-1.5/webbench.1
webbench-1.5/socket.c
webbench-1.5/webbench.c
webbench-1.5/Makefile
webbench-1.5/debian/
webbench-1.5/debian/rules
webbench-1.5/debian/dirs
webbench-1.5/debian/copyright
webbench-1.5/debian/control
webbench-1.5/debian/changelog
webbench-1.5/COPYRIGHT
webbench-1.5/ChangeLog
解压后进入对应的 webbench目录
[root@localhost pub]# cd webbench-1.5
进入后直接 make && make install
[root@localhost 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
/bin/sh: ctags: command not found
make: [tags] 错误 127 (忽略)
install -s webbench /usr/local/bin
install -m 644 webbench.1 /usr/local/man/man1
install: 无法创建一般文件“/usr/local/man/man1”: 没有那个文件或目录
make: *** [install] 错误 1原载于:http://www.forasp.cn/

出现上面的错误不要紧是没有上面提示的文件夹,你自己创建一下即可
[root@localhost webbench-1.5]# mkdir /usr/local/man
[root@localhost webbench-1.5]# mkdir /usr/local/man/man1
[root@localhost webbench-1.5]# make clean##这里清理一下make
rm -f *.o webbench *~ core *.core tags
然后进行安装
[root@localhost 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
/bin/sh: ctags: command not found
make: [tags] 错误 127 (忽略)
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
[root@localhost webbench-1.5]#
表示安装成功
测试一下
[root@localhost webbench-1.5]#  webbench -c 500 -t 10
上面是 测试有500个并发量,运行10秒钟,得出如下结构
Benchmarking: GET http://127.0.0.1/1.php
500 clients, running 10 sec.

Speed=25728 pages/min, 14519368 bytes/sec.
Requests: 4288 susceed, 0 failed.http://127.0.0.1/1.php
上面是平均访问值,下面是总访问量 和失败访问。测试高并发软件webbench还是十分不错的。
 


·上一篇:linux常见查看文件内容 >>    ·下一篇:linux安装mysql >>
推荐文章
最新文章