Webbench是一个非常简单的压力测试工具,Webbench最多可以模拟3万个并发连接去测试网站的负载能力。
(1)Webbench安装
- wget http://www.phpddt.com/soft/linux/webbench-1.5.tar.gz
- tar zxvf webbench-1.5.tar.gz
- cd webbench-1.5
- make
- make install
- webbench -c 1000 -t 60 http://www.phpddt.com/
- webbench -c 并发数 -t 运行测试时间 URL
- root@phpddt:~/webbench-1.5# webbench -c 1000 -t 60 http://www.phpddt.com/
- Webbench - Simple Web Benchmark 1.5
- Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.
- Benchmarking: GET http://www.phpddt.com/
- 1000 clients, running 60 sec.
- Speed=217591 pages/min, 5544152 bytes/sec.
- Requests: 217591 susceed, 0 failed.
Webbench官网:http://home.tiscali.cz/~cz210552/webbench.html
问题1: cannot create regular file `/usr/local/man/man1′: No such file or directory
解决方法: 创建/usr/local/man/man1文件来解决
[root@localhost local]# mkdir -m 644 -p /usr/local/man/man1
问题2: /bin/sh: ctags: command not found
解决方法:安装ctags
apt-get install ctags
问题3: cc: Command not found
解决方法: 安装gcc
apt-get install gcc