siege

1,Siege是一个HTTP压力测试和评测工具,可以根据配置对一个web站点进行多用户的并发访问,记录每个用户所请求过程的响应的时间,并在一定数量的并发访问下重复进行。

下载:

http://www.joedog.org/siege-home/

安装:

tar -xzf *.gz

./configure

make

make install

安装后:

[root@cdntest-6 ~]# siege
SIEGE 2.74
Usage: siege [options]
siege [options] URL
siege -g URL
Options:
-V, --version VERSION, prints the version number.
-h, --help HELP, prints this section.
-C, --config CONFIGURATION, show the current config.
-v, --verbose VERBOSE, prints notification to screen.
-q, --quiet QUIET turns verbose off and suppresses output.
-g, --get GET, pull down HTTP headers and display the
transaction. Great for application debugging.
-c, --concurrent=NUM CONCURRENT users, default is 10
-i, --internet INTERNET user simulation, hits URLs randomly.
-b, --benchmark BENCHMARK: no delays between requests.
-t, --time=NUMm TIMED testing where "m" is modifier S, M, or H
ex: --time=1H, one hour test.
-r, --reps=NUM REPS, number of times to run the test.
-f, --file=FILE FILE, select a specific URLS FILE.
-R, --rc=FILE RC, specify an siegerc file
-l, --log[=FILE] LOG to FILE. If FILE is not specified, the
default is used: PREFIX/var/siege.log
-m, --mark="text" MARK, mark the log file with a string.
-d, --delay=NUM Time DELAY, random delay before each requst
between 1 and NUM. (NOT COUNTED IN STATS)
-H, --header="text" Add a header to request (can be many)
-A, --user-agent="text" Sets User-Agent in request
-T, --content-type="text" Sets Content-Type in request

Copyright (C) 2013 by Jeffrey Fulmer, et al.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE.

2,增量压力测试

为了方便增量压力测试,siege还包含了一些辅助工具:bombardment

[root@cdntest-6 ~]# bombardment

usage:
bombardment [urlfile] [inital # of clients] [inc value] [# of inc] [delay]

例子:

  bombardment urlfile.txt 5 3 4 1

  初始化URL列表:urlfile.txt

  初始化为:5个用户

  每次增加:3个用户

  运行:4次

  每个客户端之间的延迟为:1秒

 

参考地址:

http://tristones.viaspeip.com/archives/000297.html

  

  

 

posted @ 2013-05-15 13:58  jiezhao  阅读(611)  评论(0编辑  收藏  举报