Siege linux压力测评


Siege
一款开源的压力测试工具,可以根据配置对一个WEB站点进行多用户的并发访问,记录每个用户所有请求过程的相应时间,并在一定数量的并发访问下重复进行。
官方:http://www.joedog.org/
Siege下载:http://soft.vpser.net/test/siege/siege-2.67.tar.gz
解压:
# tar -zxf siege-2.67.tar.gz
进入解压目录:
# cd siege-2.67/
安装:
#./configure ; make
#make install

使用
siege -c 200 -r 10 -f example.url 
-c是并发量,-r是重复次数。 url文件就是一个文本,每行都是一个url,它会从里面随机访问的。
TTP/1.1 200   0.03 secs:       8 bytes ==> /
HTTP/1.1 200   0.03 secs:       8 bytes ==> /
HTTP/1.1 200   0.01 secs:       8 bytes ==> /index.html
HTTP/1.1 200   0.01 secs:       8 bytes ==> /index.html
HTTP/1.1 200   0.01 secs:       8 bytes ==> /index.html
HTTP/1.1 200   0.01 secs:       8 bytes ==> /index.html
HTTP/1.1 200   0.01 secs:       8 bytes ==> /index.html
HTTP/1.1 200   0.01 secs:       8 bytes ==> /index.html
HTTP/1.1 200   0.02 secs:       8 bytes ==> /index.html
HTTP/1.1 200   0.02 secs:       8 bytes ==> /index.html
HTTP/1.1 200   0.02 secs:       8 bytes ==> /index.html
HTTP/1.1 200   0.01 secs:       8 bytes ==> /index.html
HTTP/1.1 200   0.01 secs:       8 bytes ==> /index.html
HTTP/1.1 200   0.01 secs:       8 bytes ==> /index.html
HTTP/1.1 200   0.01 secs:       8 bytes ==> /index.html
HTTP/1.1 200   0.01 secs:       8 bytes ==> /index.html
HTTP/1.1 200   0.01 secs:       8 bytes ==> /
HTTP/1.1 200   0.01 secs:       8 bytes ==> /index.html
HTTP/1.1 200   0.01 secs:       8 bytes ==> /
HTTP/1.1 200   0.01 secs:       8 bytes ==> /index.html
HTTP/1.1 200   0.01 secs:       8 bytes ==> /
HTTP/1.1 200   0.01 secs:       8 bytes ==> /
HTTP/1.1 200   0.00 secs:       8 bytes ==> /
HTTP/1.1 200   0.00 secs:       8 bytes ==> /
HTTP/1.1 200   0.00 secs:       8 bytes ==> /index.html
HTTP/1.1 200   0.00 secs:       8 bytes ==> /
HTTP/1.1 200   0.00 secs:       8 bytes ==> /
HTTP/1.1 200   0.00 secs:       8 bytes ==> /index.html
HTTP/1.1 200   0.00 secs:       8 bytes ==> /index.html
HTTP/1.1 200   0.00 secs:       8 bytes ==> /index.html
HTTP/1.1 200   0.00 secs:       8 bytes ==> /index.html
HTTP/1.1 200   0.00 secs:       8 bytes ==> /index.html
HTTP/1.1 200   0.00 secs:       8 bytes ==> /
HTTP/1.1 200   0.00 secs:       8 bytes ==> /
HTTP/1.1 200   0.00 secs:       8 bytes ==> /
HTTP/1.1 200   0.00 secs:       8 bytes ==> /
HTTP/1.1 200   0.00 secs:       8 bytes ==> /index.html
HTTP/1.1 200   0.00 secs:       8 bytes ==> /

#cat example.url 
http://127.0.0.1
http://127.0.0.1/index.html

/srv/www/htdocs # cat index.html 
afasdka
结果说明
Lifting the server siege… done.
Transactions: 3419263 hits //完成419263次处理
Availability: 100.00 % //100.00 % 成功率
Elapsed time: 5999.69 secs //总共用时
Data transferred: 84273.91 MB //共数据传输84273.91 MB
Response time: 0.37 secs //相应用时1.65秒:显示网络连接的速度
Transaction rate: 569.91 trans/sec //均每秒完成 569.91 次处理:表示服务器后
Throughput: 14.05 MB/sec //平均每秒传送数据
Concurrency: 213.42 //实际最高并发数
Successful transactions: 2564081 //成功处理次数
Failed transactions: 11 //失败处理次数
Longest transaction: 29.04 //每次传输所花最长时间
Shortest transaction: 0.00 //每次传输所花最短时间

 

你可能感兴趣的:(siege,linux压力测评)