webbench 是一款网站压力测试工具。
1、下载
[developer@APP211 ~]$ wget http://fossies.org/linux/www/old/webbench-1.5.tar.gz
--2014-03-25 16:57:08-- http://fossies.org/linux/www/old/webbench-1.5.tar.gz
Resolving fossies.org... 78.46.58.28
Connecting to fossies.org|78.46.58.28|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 7675 (7.5K) [application/x-gzip]
Saving to: `webbench-1.5.tar.gz'
100%[===========================================================================================>] 7,675 31.7K/s in 0.2s
2014-03-25 16:57:23 (31.7 KB/s) - `webbench-1.5.tar.gz' saved [7675/7675]
2、解压
[developer@APP211 ~]$ tar -zxvf webbench-1.5.tar.gz
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
3、安装
[developer@APP211 ~]$ cd webbench-1.5
[developer@APP211 webbench-1.5]$ sudo make && sudo make install
ctags *.c
/bin/sh: ctags: command not found
make: [tags] Error 127 (ignored)
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
4、验证是否安装成功
[developer@APP211 webbench-1.5]$ webbench --version
1.5
5、使用
[developer@APP211 webbench-1.5]$ webbench -c 10 -t 10 http://www.baidu.com/
Webbench - Simple Web Benchmark 1.5
Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software.
Benchmarking: GET http://www.baidu.com/
10 clients, running 10 sec.
Speed=84 pages/min, 70878 bytes/sec.
Requests: 14 susceed, 0 failed.
参数解释:
-c 表示并发数
-t 表示时间
每秒钟相应请求数:84/60 = 1.4pages/sec
每秒钟传输数据量:70878bytes/sec