PS:Siege是一款开源的压力测试工具,设计用于评估WEB应用在压力下的承受能力。可以根据配置对一个WEB站点进行多用户的并发访问,记录每个用户所有请求过程的相应时间,并在一定数量的并发访问下重复进行。siege可以从您选择的预置列表中请求随机的URL。所以siege可用于仿真用户请求负载,而ab则不能。但不要使用siege来执行最高性能基准调校测试,这方面ab就准确很多。
Siege官网:http://www.joedog.org/
Siege下载:wget http://www.joedog.org/pub/siege/siege-latest.tar.gz
解压并安装:
cd /root/
rz
tar -zxvf siege-2.72.tar.gz
cd siege-2.72
./configure --prefix=/usr/local/siege --mandir=/usr/local/man --with-ssl=/usr/local/ssl
mkdir -p /usr/local/siege/etc/
mkdir -p /usr/local/siege/var/
make
make install
创建.siegec.config配置文件到当前用户的家目录下
/usr/local/siege/bin/siege.config
安装完成
查看配置文件
/usr/local/siege/bin/siege -C
CURRENT SIEGE CONFIGURATION
JoeDog/1.00 [en] (X11; I; Siege 2.72)
Edit the resource file to change the settings.
----------------------------------------------
version: 2.72
verbose: false
debug: false
protocol: HTTP/1.1
connection: close
concurrent users: 15
time to run: n/a
repetitions: n/a
socket timeout: 30
delay: 1 sec
internet simulation: false
benchmark mode: false
failures until abort: 1024
named URL: