Webbench是有名的网站压力测试工具,Webbench支持多平台,FreeBSD、Linux、Windows都可以使用,现在介绍一下使用方法,webbench最多可以模拟3万个并发连接去测试网站的负载能力。
一、Webbench安装:
(1)FreeBSD系统下ports方式安装:
[[email protected] ~]#cd /usr/ports/benchmarks/webbench [[email protected] ~]# make install clean [[email protected] ~]#rehash
(2)Linux系统下源代码编译安装:
[[email protected] ~]#wget http://home.tiscali.cz/~cz210552/distfiles/webbench-1.5.tar.gz [[email protected] ~]#tar -xvpf webbench-1.5.tar.gz [root@itkylin.com ~]#cd webbench-1.5 [[email protected] ~]#make && make install
二、使用方法:
[[email protected] ~]# webbench -c 1000 -t 20 https://www.itkylin.com/
参数说明:-c 表示客户端数,-t 表示时间
三、测试结果:
Webbench - Simple Web Benchmark 1.5 Copyright (c) Radim Kolar 1997-2004, GPL Open Source Software. Benchmarking: GET https://www.itkylin.com/ 1000 clients, running 20 sec. Speed=342 pages/min, 225793 bytes/sec. Requests: 57 susceed, 0 failed. [root@www.itkylin.com ~]#