http://www.joedog.org/index/siege-home
Debian/Ubuntu
neo@debian:~$ apt-cache search Siege siege - Http regression testing and benchmarking utility neo@debian:~$ sudo apt-get install siege
CentOS
# yum install siege
参数
New configuration template added to /root/.siege Run siege -C to view the current settings in that file SIEGE 4.0.2 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 -r, --reps=NUM REPS, number of times to run the test. -t, --time=NUMm TIMED testing where "m" is modifier S, M, or H ex: --time=1H, one hour test. -d, --delay=NUM Time DELAY, random delay before each requst -b, --benchmark BENCHMARK: no delays between requests. -i, --internet INTERNET user simulation, hits URLs randomly. -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. between .001 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) 2016 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.
.siegerc
verbose = false internet = true benchmark = true
siege参数介绍
参数
-c, --concurrent=NUM 并发用户量,默认为10
-u, --url="URL"
-i, --internet INTERNET user simulation, hits the URLs randomly.
-b, --benchmark 基准测试, signifies no delay for time testing.
-t, --time=NUMm 持续时间,单位默认为分"m" 同样可以使用 S, M, 或 H 例如: --time=1H, 一小时.
-r, --reps=NUM REPS, number of times to run the test, default is 25
-f, --file=FILE FILE, url列表配置文件.
参数
Transactions 总共完成了X次请求
Availability 有效性
Elapsed time 花费时间
Data transferred传输数据X兆
Response time 响应时间
Transaction rate每秒传输率:次/每秒
Throughput 每秒数据吞吐量
Concurrency 实际并发
Successful transactions 成功的传输
Failed transactions 失败的传输
Longest transaction 传输所花最长时间
Shortest transaction 传输所花最短时间
siege -c 1000 -d 30 http://172.16.0.8/
siege -c 1000 -r 50 -i -b -t 2 -d 30 -f test.txt cat test.txt http://172.16.0.2/index.html http://172.16.0.2/list.html http://172.16.0.2/product.html http://172.16.0.2/login.html