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