第一个里程碑:下载软件包
[root@oldboy43-01/server/tools]#wget http://blog.s135.com/soft/linux/webbench/webbench-1.5.tar.gz
--2018-03-08 12:02:09-- http://blog.s135.com/soft/linux/webbench/webbench-1.5.tar.gz
Resolving blog.s135.com... 47.89.12.190
Connecting to blog.s135.com|47.89.12.190|:80... connected.
HTTP request sent, awaiting response... Read error (Connection reset by peer) in headers.
Retrying.
--2018-03-08 12:02:11-- (try: 2) http://blog.s135.com/soft/linux/webbench/webbench-1.5.tar.gz
Connecting to blog.s135.com|47.89.12.190|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://zyan.cc/soft/linux/webbench/webbench-1.5.tar.gz [following]
--2018-03-08 12:02:11-- http://zyan.cc/soft/linux/webbench/webbench-1.5.tar.gz
Resolving zyan.cc... 47.89.12.190
Reusing existing connection to blog.s135.com:80.
HTTP request sent, awaiting response... 200 OK
第二个里程碑:下载所需依赖关系包,创建所需目录
[root@oldboy43-01/server/tools/webbench-1.5]#yum install ctags -y
[root@oldboy43-01/server/tools/webbench-1.5]#mkdir /usr/local/man
第三个里程碑:解压压缩包,编译安装
[root@oldboy43-01/server/tools/webbench-1.5]#tar xf webbench-1.5.tar.gz
[root@oldboy43-01/server/tools/webbench-1.5]#make
cc -Wall -ggdb -W -O -c -o webbench.o webbench.c
webbench.c: In function ‘alarm_handler’:
webbench.c:77: warning: unused parameter ‘signal’
cc -Wall -ggdb -W -O -o webbench webbench.o
ctags *.c
[root@oldboy43-01/server/tools/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
第四个里程碑:对www.etiantian.org开始压力测试---并发由小到大
[root@oldboy43-01/server/tools/webbench-1.5]#webbench -c 600 -t 30 http://www.etiantian.org/
Webbench - Simple Web Benchmark 1.5
Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.
Benchmarking: GET http://www.etiantian.org/
600 clients, running 30 sec.
Speed=25742 pages/min, 161671 bytes/sec.
Requests: 12781 susceed, 90 failed
-c 并发数 -t 测试时间
压测网站cpu负载情况显示