GVKun编程网logo

Siege 2.73b1 发布,Web 压力测试工具(web压力测试软件)

1

如果您想了解Siege2.73b1发布,Web压力测试工具的相关知识,那么本文是一篇不可错过的文章,我们将对web压力测试软件进行全面详尽的解释,并且为您提供关于ab,webbench,Siege,h

如果您想了解Siege 2.73b1 发布,Web 压力测试工具的相关知识,那么本文是一篇不可错过的文章,我们将对web压力测试软件进行全面详尽的解释,并且为您提供关于ab,webbench,Siege,http_load,Web Application Stress、CentOS 上安装 Web 性能测试工具 Siege & 示例、Linux下四款Web服务器压力测试工具(http_load、webbench、ab、siege)、mac siege 测压的有价值的信息。

本文目录一览:

Siege 2.73b1 发布,Web 压力测试工具(web压力测试软件)

Siege 2.73b1 发布,Web 压力测试工具(web压力测试软件)

Siege 2.73b1 发布,该版本修复了 kfreebsd-* 内核下的编译问题,同时利用 /dev/urandom 来提升随机性。

Siege是一个压力测试和评测工具,设计用于WEB开发这评估应用在压力下的承受能力:可以根据配置对一个WEB站点进行多用户的并发访问,记录每个用户所有请求过程的相应时间,并在一定数量的并发访问下重复进行。

测试方法请看这里。

ab,webbench,Siege,http_load,Web Application Stress

ab,webbench,Siege,http_load,Web Application Stress

 

压力测试工具

----------------------------------------------------------------------------

Http_load

http://baike.baidu.com/view/4137750.htm

 

http_load性能测试工具

http://blog.19lou.com/11438336/viewspace-2956557

 

压力测试工具集合【ab,webbench,Siege,http_load,Web Application Stress】

http://hi.baidu.com/sky9812/item/fc120bad088036776dd45562  

 

Web服务器性能/压力测试工具http_load、webbench、ab、Siege使用教程

http://blog.licess.org/http_load-webbench-ab-siege/   

 

三种web性能压力测试工具http_load webbench ab

http://blog.sina.com.cn/s/blog_490eec930100d0fr.html 

 

 

Linux下四款Web服务器压力测试工具(http_load、webbench、ab、siege)介绍----------------------------------------------------------------------------

一、http_load
程序非常小,解压后也不到100K
http_load以并行复用的方式运行,用以测试web服务器的吞吐量与负载。但是它不同于大多数压力测试工具,它可以以一个单一的进程运行,一般不会把客户机搞死。还可以测试HTTPS类的网站请求。

下载地址:http://soft.vpser.net/test/http_load/http_load-12mar2006.tar.gz

安装
#tar zxvf http_load-12mar2006.tar.gz
#cd http_load-12mar2006
#make && make install

<!--more-->

命令格式:http_load -p 并发访问进程数 -s 访问时间 需要访问的URL文件
参数其实可以自由组合,参数之间的选择并没有什么限制。比如你写成http_load -parallel 5 -seconds
300 urls.txt也是可以的。我们把参数给大家简单说明一下。
-parallel 简写-p :含义是并发的用户进程数。
-fetches 简写-f :含义是总计的访问次数
-rate 简写-p :含义是每秒的访问频率
-seconds简写-s :含义是总计的访问时间
准备URL文件:urllist.txt,文件格式是每行一个URL,URL最好超过50-100个测试效果比较好.文件格式如下:
http://www.vpser.net/uncategorized/choose-vps.html
http://www.vpser.net/vps-cp/hypervm-tutorial.html
http://www.vpser.net/coupons/diavps-april-coupons.html
http://www.vpser.net/security/vps-backup-web-mysql.html
例如:
http_load -p 30 -s 60 urllist.txt
参数了解了,我们来看运行一条命令来看看它的返回结果
命令:% ./http_load -rate 5 -seconds 10 urls说明执行了一个持续时间10秒的测试,每秒的频率为5。
49 fetches, 2 max parallel, 289884 bytes, in 10.0148 seconds5916 mean bytes/connection4.89274
fetches/sec, 28945.5 bytes/secmsecs/connect: 28.8932 mean, 44.243 max, 24.488 minmsecs/first
-response: 63.5362 mean, 81.624 max, 57.803 minHTTP response codes: code 200 — 49

结果分析:
1.49 fetches, 2 max parallel, 289884 bytes, in 10.0148 seconds
说明在上面的测试中运行了49个请求,最大的并发进程数是2,总计传输的数据是289884bytes,运行的时间是10.0148秒
2.5916 mean bytes/connection说明每一连接平均传输的数据量289884/49=5916
3.4.89274 fetches/sec, 28945.5 bytes/sec
说明每秒的响应请求为4.89274,每秒传递的数据为28945.5 bytes/sec
4.msecs/connect: 28.8932 mean, 44.243 max, 24.488 min说明每连接的平均响应时间是28.8932 msecs,最大的响应时间44.243 msecs,最小的响应时间24.488 msecs
5.msecs/first-response: 63.5362 mean, 81.624 max, 57.803 min
6、HTTP response codes: code 200 — 49 说明打开响应页面的类型,如果403的类型过多,那可能

要注意是否系统遇到了瓶颈。
特殊说明:
测试结果中主要的指标是 fetches/sec、msecs/connect 这个选项,即服务器每秒能够响应的查询次数,用这个指标来衡量性能。似乎比 apache的ab准确率要高一些,也更有说服力一些。
Qpt-每秒响应用户数和response time,每连接响应用户时间。
测试的结果主要也是看这两个值。当然仅有这两个指标并不能完成对性能的分析,我们还需要对服务器的cpu、men进行分析,才能得出结论

二、webbench

webbench是Linux下的一个网站压力测试工具,最多可以模拟3万个并发连接去测试网站的负载能力。下载地址可以到google搜,我这里给出一个
下载地址:http://soft.vpser.net/test/webbench/webbench-1.5.tar.gz
这个程序更小,解压后不到50K,呵呵

安装
#tar zxvf webbench-1.5.tar.gz
#cd webbench-1.5
#make && make install
会在当前目录生成webbench可执行文件,直接可以使用了

用法:
webbench -c 并发数 -t 运行测试时间 URL
如:
webbench -c 5000 -t 120 http://www.163.com

三、ab

选项

-A auth-username:password
对服务器提供BASIC认证信任。 用户名和密码由一个:隔开,并以base64编码形式发送。 无论服务器是否需要(即, 是否发送了401认证需求代码),此字符串都会被发送。
-c concurrency
一次产生的请求个数。默认是一次一个。
-C cookie-name=value
对请求附加一个Cookie:行。 其典型形式是name=value的一个参数对。 此参数可以重复。
-d
不显示"percentage served within XX [ms] table"的消息(为以前的版本提供支持)。
-e csv-file
产生一个以逗号分隔的(CSV)文件, 其中包含了处理每个相应百分比的请求所需要(从1%到100%)的相应百分比的(以微妙为单位)时间。 由于这种格式已经“二进制化”,所以比''gnuplot''格式更有用。
-g gnuplot-file
把所有测试结果写入一个''gnuplot''或者TSV (以Tab分隔的)文件。 此文件可以方便地导入到Gnuplot, IDL, Mathematica, Igor甚至Excel中。 其中的第一行为标题。
-h
显示使用方法。
-H custom-header
对请求附加额外的头信息。 此参数的典型形式是一个有效的头信息行,其中包含了以冒号分隔的字段和值的对 (如, "Accept-Encoding: zip/zop;8bit").
-i
执行HEAD请求,而不是GET。
-k
启用HTTP KeepAlive功能,即, 在一个HTTP会话中执行多个请求。 默认时,不启用KeepAlive功能.
-n requests
在测试会话中所执行的请求个数。 默认时,仅执行一个请求,但通常其结果不具有代表意义。
-p POST-file
包含了需要POST的数据的文件.
-P proxy-auth-username:password
对一个中转代理提供BASIC认证信任。 用户名和密码由一个:隔开,并以base64编码形式发送。 无论服务器是否需要(即, 是否发送了401认证需求代码),此字符串都会被发送。
-q
如果处理的请求数大于150, ab每处理大约10%或者100个请求时,会在stderr输出一个进度计数。 此-q标记可以抑制这些信息。
-s
用于编译中(ab -h会显示相关信息)使用了SSL的受保护的https, 而不是http协议的时候。此功能是实验性的,也是很简陋的。最好不要用。
-S
不显示中值和标准背离值, 而且在均值和中值为标准背离值的1到2倍时,也不显示警告或出错信息。 默认时,会显示 最小值/均值/最大值等数值。(为以前的版本提供支持).
-t timelimit
测试所进行的最大秒数。其内部隐含值是-n 50000。 它可以使对服务器的测试限制在一个固定的总时间以内。默认时,没有时间限制。
-T content-type
POST数据所使用的Content-type头信息。
-v verbosity
设置显示信息的详细程度 - 4或更大值会显示头信息, 3或更大值可以显示响应代码(404, 200等), 2或更大值可以显示警告和其他信息。
-V
显示版本号并退出。
-w
以HTML表的格式输出结果。默认时,它是白色背景的两列宽度的一张表。
-x <table>-attributes
设置<table>属性的字符串。 此属性被填入<table 这里 >.
-X proxy[:port]
对请求使用代理服务器。
-y <tr>-attributes
设置<tr>属性的字符串.
-z <td>-attributes
设置<td>属性的字符串.

缺陷
程序中有各种静态声明的固定长度的缓冲区。 另外,对命令行参数、服务器的响应头和其他外部输入的解析也很简单,这可能会有不良后果。

它没有完整地实现HTTP/1.x; 仅接受某些''预想''的响应格式。 strstr(3)的频繁使用可能会带来性能问题,即, 你可能是在测试ab而不是服务器的性能。

 

参数很多,一般我们用 -c 和 -n 参数就可以了. 例如:

./ab -c 1000 -n 1000 http://127.0.0.1/index.php

这个表示同时处理1000个请求并运行1000次index.php文件.
#/usr/local/xiaobai/apache2054/bin/ab -c 1000 -n 1000 http://127.0.0.1/index.html.zh-cn.gb2312
This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> apache-2.0
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/

Benchmarking 127.0.0.1 (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Finished 1000 requests


Server Software: Apache/2.0.54
//平台apache 版本2.0.54
Server Hostname: 127.0.0.1
//服务器主机名
Server Port: 80
//服务器端口

Document Path: /index.html.zh-cn.gb2312
//测试的页面文档
Document Length: 1018 bytes
//文档大小

Concurrency Level: 1000
//并发数
Time taken for tests: 8.188731 seconds
//整个测试持续的时间
Complete requests: 1000
//完成的请求数量
Failed requests: 0
//失败的请求数量
Write errors: 0

Total transferred: 1361581 bytes
//整个场景中的网络传输量
HTML transferred: 1055666 bytes
//整个场景中的HTML内容传输量
Requests per second: 122.12 [#/sec] (mean)
//大家最关心的指标之一,相当于 LR 中的 每秒事务数 ,后面括号中的 mean 表示这是一个平均值
Time per request: 8188.731 [ms] (mean)
//大家最关心的指标之二,相当于 LR 中的 平均事务响应时间 ,后面括号中的 mean 表示这是一个平均值
Time per request: 8.189 [ms] (mean, across all concurrent requests)
//每个请求实际运行时间的平均值
Transfer rate: 162.30 [Kbytes/sec] received
//平均每秒网络上的流量,可以帮助排除是否存在网络流量过大导致响应时间延长的问题

Connection Times (ms)
min mean[+/-sd] median max
Connect: 4 646 1078.7 89 3291
Processing: 165 992 493.1 938 4712
Waiting: 118 934 480.6 882 4554
Total: 813 1638 1338.9 1093 7785
//网络上消耗的时间的分解,各项数据的具体算法还不是很清楚

Percentage of the requests served within a certain time (ms)
50% 1093
66% 1247
75% 1373
80% 1493
90% 4061
95% 4398
98% 5608
99% 7368
100% 7785 (longest request)
//整个场景中所有请求的响应情况。在场景中每个请求都有一个响应时间,其中50%的用户响应时间小于1093 毫秒,60% 的用户响应时间小于1247 毫秒,最大的响应时间小于7785 毫秒

由于对于并发请求,cpu实际上并不是同时处理的,而是按照每个请求获得的时间片逐个轮转处理的,所以基本上第一个Time per request时间约等于第二个Time per request时间乘以并发请求数



四、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,它会从里面随机访问的。

example.url内容:

http://www.licess.cn
http://www.vpser.net
http://soft.vpser.net

结果说明
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 //每次传输所花最短时间

CentOS 上安装 Web 性能测试工具 Siege & 示例

CentOS 上安装 Web 性能测试工具 Siege & 示例

本文记录一次在 CentOS 上安装 Web 性能测试工具 Siege 的步骤,并对安装过程中遇到的问题进行解决

Siege 是什么?


Siege 是一个压力测试和评测工具,设计用于 WEB 开发这评估应用在压力下的承受能力:可以根据配置对一个 WEB 站点进行多用户的并发访问,记录每个用户所有请求过程的相应时间,并在一定数量的并发访问下重复进行。

官网【https://www.joedog.org/】

安装 Siege

下载 Siege 安装包


可以访问【http://download.joedog.org/siege/】下载 Siege 安装包,本文下载的是 siege-4.0.2.tar.gz

使用 wget 下载安装包~


wget http://download.joedog.org/siege/siege-4.0.2.tar.gz

如:

[root@test03 srv]# wget http://download.joedog.org/siege/siege-4.0.2.tar.gz--2017-06-02 17:30:09-- http://download.joedog.org/siege/siege-4.0.2.tar.gzResolving download.joedog.org... 52.24.24.107Connecting to download.joedog.org|52.24.24.107|:80... connected.HTTP request sent, awaiting response... 200 OKLength: 521228 (509K) [application/x-gzip]Saving to: “siege-4.0.2.tar.gz”
100%[====================================================================================================================================================================================================================================>] 521,228 387K/s in 1.3s
2017-06-02 17:30:12 (387 KB/s) - “siege-4.0.2.tar.gz” saved [521228/521228]
[root@test03 srv]#

解压

将下载好的 siege 安装包解开~

tar -zvxf siege-4.0.2.tar.gz 

如,

[root@test03 srv]# tar -zvxf siege-4.0.2.tar.gz siege-4.0.2/siege-4.0.2/src/siege-4.0.2/src/timer.hsiege-4.0.2/src/handler.csiege-4.0.2/src/browser.csiege-4.0.2/src/handler.hsiege-4.0.2/src/base64.hsiege-4.0.2/src/cookie.hsiege-4.0.2/src/timer.csiege-4.0.2/src/main.csiege-4.0.2/src/init.csiege-4.0.2/src/util.csiege-4.0.2/src/auth.hsiege-4.0.2/src/cookies.hsiege-4.0.2/src/data.hsiege-4.0.2/src/stralloc.csiege-4.0.2/src/creds.csiege-4.0.2/src/page.csiege-4.0.2/src/cache.csiege-4.0.2/src/data.csiege-4.0.2/src/perl.hsiege-4.0.2/src/cookies.csiege-4.0.2/src/http.csiege-4.0.2/src/hash.csiege-4.0.2/src/util.hsiege-4.0.2/src/response.hsiege-4.0.2/src/response.csiege-4.0.2/src/stralloc.hsiege-4.0.2/src/ssl.csiege-4.0.2/src/ftp.csiege-4.0.2/src/date.hsiege-4.0.2/src/hash.hsiege-4.0.2/src/init.hsiege-4.0.2/src/page.hsiege-4.0.2/src/url.hsiege-4.0.2/src/date.csiege-4.0.2/src/notify.hsiege-4.0.2/src/parser.csiege-4.0.2/src/load.hsiege-4.0.2/src/load.csiege-4.0.2/src/http.hsiege-4.0.2/src/ansidecl.hsiege-4.0.2/src/md5.csiege-4.0.2/src/ssl.hsiege-4.0.2/src/memory.hsiege-4.0.2/src/array.csiege-4.0.2/src/browser.hsiege-4.0.2/src/getopt.csiege-4.0.2/src/version.csiege-4.0.2/src/array.hsiege-4.0.2/src/Makefile.insiege-4.0.2/src/eval.csiege-4.0.2/src/parser.hsiege-4.0.2/src/setup.hsiege-4.0.2/src/log.hsiege-4.0.2/src/cache.hsiege-4.0.2/src/crew.csiege-4.0.2/src/creds.hsiege-4.0.2/src/log.csiege-4.0.2/src/sock.csiege-4.0.2/src/memory.csiege-4.0.2/src/crew.hsiege-4.0.2/src/version.hsiege-4.0.2/src/ftp.hsiege-4.0.2/src/cfg.csiege-4.0.2/src/url.csiege-4.0.2/src/eval.hsiege-4.0.2/src/md5.hsiege-4.0.2/src/perl.csiege-4.0.2/src/Makefile.amsiege-4.0.2/src/sock.hsiege-4.0.2/src/cfg.hsiege-4.0.2/src/getopt1.csiege-4.0.2/src/auth.csiege-4.0.2/src/notify.csiege-4.0.2/src/base64.csiege-4.0.2/src/cookie.csiege-4.0.2/COPYINGsiege-4.0.2/utils/siege-4.0.2/utils/compilesiege-4.0.2/utils/config.guesssiege-4.0.2/utils/install-shsiege-4.0.2/utils/config.subsiege-4.0.2/utils/bombardment.insiege-4.0.2/utils/ltmain.shsiege-4.0.2/utils/siege2csv.insiege-4.0.2/utils/bootstrapsiege-4.0.2/utils/missingsiege-4.0.2/utils/mkstampsiege-4.0.2/utils/Makefile.insiege-4.0.2/utils/siege.config.insiege-4.0.2/utils/Makefile.amsiege-4.0.2/utils/mkinstalldirssiege-4.0.2/utils/mdate-shsiege-4.0.2/doc/siege-4.0.2/doc/siege2csv.1.insiege-4.0.2/doc/urls.txtsiege-4.0.2/doc/Makefile.insiege-4.0.2/doc/siege.config.1.insiege-4.0.2/doc/siege2csv.podsiege-4.0.2/doc/bombardment.podsiege-4.0.2/doc/siege.podsiege-4.0.2/doc/bombardment.1.insiege-4.0.2/doc/siege.config.podsiege-4.0.2/doc/siege.1.insiege-4.0.2/doc/Makefile.amsiege-4.0.2/doc/siegerc.insiege-4.0.2/INSTALLsiege-4.0.2/include/siege-4.0.2/include/joedog/siege-4.0.2/include/joedog/path.hsiege-4.0.2/include/joedog/getopt.hsiege-4.0.2/include/joedog/Makefile.insiege-4.0.2/include/joedog/defs.hsiege-4.0.2/include/joedog/boolean.hsiege-4.0.2/include/joedog/Makefile.amsiege-4.0.2/include/config.h.insiege-4.0.2/include/Makefile.insiege-4.0.2/include/Makefile.amsiege-4.0.2/README.mdsiege-4.0.2/install-shsiege-4.0.2/configure.acsiege-4.0.2/aclocal.m4siege-4.0.2/acinclude.m4siege-4.0.2/ChangeLogsiege-4.0.2/Makefile.insiege-4.0.2/html/siege-4.0.2/html/basic.phpsiege-4.0.2/html/READMEsiege-4.0.2/html/etag.phpsiege-4.0.2/html/cookie-expire.phpsiege-4.0.2/html/cache-control.phpsiege-4.0.2/html/Makefile.insiege-4.0.2/html/login.phpsiege-4.0.2/html/Makefile.amsiege-4.0.2/configuresiege-4.0.2/Makefile.amsiege-4.0.2/acspecific.m4siege-4.0.2/AUTHORS[root@test03 srv]#

configure

进入解压缩后 siege 目录,执行./configure

[root@test03 srv]# cd siege-4.0.2[root@test03 siege-4.0.2]# ./configurechecking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking for a thread-safe mkdir -p... /bin/mkdir -pchecking for gawk... gawkchecking whether make sets $(MAKE)... yeschecking build system type... x86_64-unknown-linux-gnuchecking host system type... x86_64-unknown-linux-gnuchecking for style of include used by make... GNUchecking for gcc... nochecking for cc... nochecking for cl.exe... noconfigure: error: in `/srv/siege-4.0.2'':configure: error: no acceptable C compiler found in $PATHSee `config.log'' for more details[root@test03 siege-4.0.2]#

报错了~

configure: error: no acceptable C compiler found in $PATH

解决方法

安装 gcc 即可~

安装 gcc

yum install gcc

[root@test03 siege-4.0.2]# yum install gccLoaded plugins: fastestmirrorSetting up Install ProcessLoading mirror speeds from cached hostfileISO | 3.7 kB 00:00 Resolving Dependencies--> Running transaction check---> Package gcc.x86_64 0:4.4.7-18.el6 will be installed--> Processing Dependency: libgomp = 4.4.7-18.el6 for package: gcc-4.4.7-18.el6.x86_64--> Processing Dependency: cpp = 4.4.7-18.el6 for package: gcc-4.4.7-18.el6.x86_64--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.4.7-18.el6.x86_64--> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.7-18.el6.x86_64--> Processing Dependency: libgomp.so.1()(64bit) for package: gcc-4.4.7-18.el6.x86_64--> Running transaction check---> Package cloog-ppl.x86_64 0:0.15.7-1.2.el6 will be installed--> Processing Dependency: libppl_c.so.2()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64--> Processing Dependency: libppl.so.7()(64bit) for package: cloog-ppl-0.15.7-1.2.el6.x86_64---> Package cpp.x86_64 0:4.4.7-18.el6 will be installed--> Processing Dependency: libmpfr.so.1()(64bit) for package: cpp-4.4.7-18.el6.x86_64---> Package glibc-devel.x86_64 0:2.12-1.209.el6 will be installed--> Processing Dependency: glibc-headers = 2.12-1.209.el6 for package: glibc-devel-2.12-1.209.el6.x86_64--> Processing Dependency: glibc-headers for package: glibc-devel-2.12-1.209.el6.x86_64---> Package libgomp.x86_64 0:4.4.7-18.el6 will be installed--> Running transaction check---> Package glibc-headers.x86_64 0:2.12-1.209.el6 will be installed--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.12-1.209.el6.x86_64--> Processing Dependency: kernel-headers for package: glibc-headers-2.12-1.209.el6.x86_64---> Package mpfr.x86_64 0:2.4.1-6.el6 will be installed---> Package ppl.x86_64 0:0.10.2-11.el6 will be installed--> Running transaction check---> Package kernel-headers.x86_64 0:2.6.32-696.el6 will be installed--> Finished Dependency Resolution
Dependencies Resolved
============================================================================================================================================================================================================================================================================== Package Arch Version Repository Size==============================================================================================================================================================================================================================================================================Installing: gcc x86_64 4.4.7-18.el6 ISO 10 MInstalling for dependencies: cloog-ppl x86_64 0.15.7-1.2.el6 ISO 93 k cpp x86_64 4.4.7-18.el6 ISO 3.7 M glibc-devel x86_64 2.12-1.209.el6 ISO 990 k glibc-headers x86_64 2.12-1.209.el6 ISO 619 k kernel-headers x86_64 2.6.32-696.el6 ISO 4.5 M libgomp x86_64 4.4.7-18.el6 ISO 134 k mpfr x86_64 2.4.1-6.el6 ISO 157 k ppl x86_64 0.10.2-11.el6 ISO 1.3 M
Transaction Summary==============================================================================================================================================================================================================================================================================Install 9 Package(s)
Total download size: 22 MInstalled size: 39 MIs this ok [y/N]:

选择 y

Is this ok [y/N]: yDownloading Packages:(1/9): cloog-ppl-0.15.7-1.2.el6.x86_64.rpm | 93 kB 00:00 (2/9): cpp-4.4.7-18.el6.x86_64.rpm | 3.7 MB 00:00 (3/9): gcc-4.4.7-18.el6.x86_64.rpm | 10 MB 00:00 (4/9): glibc-devel-2.12-1.209.el6.x86_64.rpm | 990 kB 00:00 (5/9): glibc-headers-2.12-1.209.el6.x86_64.rpm | 619 kB 00:00 (6/9): kernel-headers-2.6.32-696.el6.x86_64.rpm | 4.5 MB 00:00 (7/9): libgomp-4.4.7-18.el6.x86_64.rpm | 134 kB 00:00 (8/9): mpfr-2.4.1-6.el6.x86_64.rpm | 157 kB 00:00 (9/9): ppl-0.10.2-11.el6.x86_64.rpm | 1.3 MB 00:00 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Total 24 MB/s | 22 MB 00:00 Running rpm_check_debugRunning Transaction TestTransaction Test SucceededRunning Transaction Installing : ppl-0.10.2-11.el6.x86_64 1/9 Installing : cloog-ppl-0.15.7-1.2.el6.x86_64 2/9 Installing : mpfr-2.4.1-6.el6.x86_64 3/9 Installing : cpp-4.4.7-18.el6.x86_64 4/9 Installing : libgomp-4.4.7-18.el6.x86_64 5/9 Installing : kernel-headers-2.6.32-696.el6.x86_64 6/9 Installing : glibc-headers-2.12-1.209.el6.x86_64 7/9 Installing : glibc-devel-2.12-1.209.el6.x86_64 8/9 Installing : gcc-4.4.7-18.el6.x86_64 9/9 Verifying : kernel-headers-2.6.32-696.el6.x86_64 1/9 Verifying : cpp-4.4.7-18.el6.x86_64 2/9 Verifying : glibc-headers-2.12-1.209.el6.x86_64 3/9 Verifying : libgomp-4.4.7-18.el6.x86_64 4/9 Verifying : mpfr-2.4.1-6.el6.x86_64 5/9 Verifying : glibc-devel-2.12-1.209.el6.x86_64 6/9 Verifying : gcc-4.4.7-18.el6.x86_64 7/9 Verifying : ppl-0.10.2-11.el6.x86_64 8/9 Verifying : cloog-ppl-0.15.7-1.2.el6.x86_64 9/9
Installed: gcc.x86_64 0:4.4.7-18.el6
Dependency Installed: cloog-ppl.x86_64 0:0.15.7-1.2.el6 cpp.x86_64 0:4.4.7-18.el6 glibc-devel.x86_64 0:2.12-1.209.el6 glibc-headers.x86_64 0:2.12-1.209.el6 kernel-headers.x86_64 0:2.6.32-696.el6 libgomp.x86_64 0:4.4.7-18.el6 mpfr.x86_64 0:2.4.1-6.el6 ppl.x86_64 0:0.10.2-11.el6
Complete![root@test03 siege-4.0.2]#

再次执行./confgiure

[root@test03 siege-4.0.2]# ./configurechecking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking for a thread-safe mkdir -p... /bin/mkdir -pchecking for gawk... gawkchecking whether make sets $(MAKE)... yeschecking build system type... x86_64-unknown-linux-gnuchecking host system type... x86_64-unknown-linux-gnuchecking for style of include used by make... GNUchecking for gcc... gccchecking whether the C compiler works... yeschecking for C compiler default output file name... a.outchecking for suffix of executables... checking whether we are cross compiling... nochecking for suffix of object files... ochecking whether we are using the GNU C compiler... yeschecking whether gcc accepts -g... yeschecking for gcc option to accept ISO C89... none neededchecking dependency style of gcc... nonechecking how to run the C preprocessor... gcc -Echecking for grep that handles long lines and -e... /bin/grepchecking for egrep... /bin/grep -Echecking for ANSI C header files... yeschecking for sys/types.h... yeschecking for sys/stat.h... yeschecking for stdlib.h... yeschecking for string.h... yeschecking for memory.h... yeschecking for strings.h... yeschecking for inttypes.h... yeschecking for stdint.h... yeschecking for unistd.h... yeschecking minix/config.h usability... nochecking minix/config.h presence... nochecking for minix/config.h... nochecking whether it is safe to define __EXTENSIONS__... yeschecking for gcc... (cached) gccchecking whether we are using the GNU C compiler... (cached) yeschecking whether gcc accepts -g... (cached) yeschecking for gcc option to accept ISO C89... (cached) none neededchecking dependency style of gcc... (cached) nonechecking for a sed that does not truncate output... /bin/sedchecking for ld used by gcc... /usr/bin/ldchecking if the linker (/usr/bin/ld) is GNU ld... yeschecking for /usr/bin/ld option to reload object files... -rchecking for BSD-compatible nm... /usr/bin/nm -Bchecking whether ln -s works... yeschecking how to recognise dependent libraries... pass_allchecking dlfcn.h usability... yeschecking dlfcn.h presence... yeschecking for dlfcn.h... yeschecking for g++... nochecking for c++... nochecking for gpp... nochecking for aCC... nochecking for CC... nochecking for cxx... nochecking for cc++... nochecking for cl.exe... nochecking for FCC... nochecking for KCC... nochecking for RCC... nochecking for xlC_r... nochecking for xlC... nochecking whether we are using the GNU C++ compiler... nochecking whether g++ accepts -g... nochecking dependency style of g++... nonechecking for g77... nochecking for xlf... nochecking for f77... nochecking for frt... nochecking for pgf77... nochecking for cf77... nochecking for fort77... nochecking for fl32... nochecking for af77... nochecking for xlf90... nochecking for f90... nochecking for pgf90... nochecking for pghpf... nochecking for epcf90... nochecking for gfortran... nochecking for g95... nochecking for xlf95... nochecking for f95... nochecking for fort... nochecking for ifort... nochecking for ifc... nochecking for efc... nochecking for pgfortran... nochecking for pgf95... nochecking for lf95... nochecking for ftn... nochecking whether we are using the GNU Fortran 77 compiler... nochecking whether accepts -g... nochecking the maximum length of command line arguments... 32768checking command to parse /usr/bin/nm -B output from gcc object... okchecking for objdir... .libschecking for ar... archecking for ranlib... ranlibchecking for strip... stripchecking if gcc supports -fno-rtti -fno-exceptions... nochecking for gcc option to produce PIC... -fPICchecking if gcc PIC flag -fPIC works... yeschecking if gcc static flag -static works... nochecking if gcc supports -c -o file.o... yeschecking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yeschecking whether -lc should be explicitly linked in... nochecking dynamic linker characteristics... GNU/Linux ld.sochecking how to hardcode library paths into programs... immediatechecking whether stripping libraries is possible... yeschecking if libtool supports shared libraries... yeschecking whether to build shared libraries... yeschecking whether to build static libraries... yesconfigure: creating libtoolappending configuration tag "CXX" to libtoolappending configuration tag "F77" to libtoolchecking for perl... /usr/bin/perlchecking for a POSIX-compliant shell... /bin/shchecking whether make sets $(MAKE)... (cached) yeschecking for buggy pthread mutex initializers... nochecking for dlopen() in -ldld... nochecking for dlopen() in -ldl... yeschecking for random device... yeschecking for ssl support... yeschecking /include/openssl/opensslv.h usability... nochecking /include/openssl/opensslv.h presence... nochecking for /include/openssl/opensslv.h... nochecking /usr/include/openssl/opensslv.h usability... nochecking /usr/include/openssl/opensslv.h presence... nochecking for /usr/include/openssl/opensslv.h... nochecking /usr/local/include/openssl/opensslv.h usability... nochecking /usr/local/include/openssl/opensslv.h presence... nochecking for /usr/local/include/openssl/opensslv.h... nochecking /usr/local/ssl/include/openssl/opensslv.h usability... nochecking /usr/local/ssl/include/openssl/opensslv.h presence... nochecking for /usr/local/ssl/include/openssl/opensslv.h... nochecking /usr/pkg/include/openssl/opensslv.h usability... nochecking /usr/pkg/include/openssl/opensslv.h presence... nochecking for /usr/pkg/include/openssl/opensslv.h... nochecking /usr/lib/ssl/include/openssl/opensslv.h usability... nochecking /usr/lib/ssl/include/openssl/opensslv.h presence... nochecking for /usr/lib/ssl/include/openssl/opensslv.h... nochecking /usr/include/ssl/include/openssl/opensslv.h usability... nochecking /usr/include/ssl/include/openssl/opensslv.h presence... nochecking for /usr/include/ssl/include/openssl/opensslv.h... nochecking /usr/include/include/openssl/opensslv.h usability... nochecking /usr/include/include/openssl/opensslv.h presence... nochecking for /usr/include/include/openssl/opensslv.h... nochecking for zlib support... yeschecking /include/zlib.h usability... nochecking /include/zlib.h presence... nochecking for /include/zlib.h... nochecking /usr/include/zlib.h usability... nochecking /usr/include/zlib.h presence... nochecking for /usr/include/zlib.h... nochecking /usr/local/include/zlib.h usability... nochecking /usr/local/include/zlib.h presence... nochecking for /usr/local/include/zlib.h... nochecking /usr/local/ssl/include/zlib.h usability... nochecking /usr/local/ssl/include/zlib.h presence... nochecking for /usr/local/ssl/include/zlib.h... nochecking /usr/pkg/include/zlib.h usability... nochecking /usr/pkg/include/zlib.h presence... nochecking for /usr/pkg/include/zlib.h... nochecking /usr/lib/zlib/include/zlib.h usability... nochecking /usr/lib/zlib/include/zlib.h presence... nochecking for /usr/lib/zlib/include/zlib.h... nochecking /usr/include/zlib/include/zlib.h usability... nochecking /usr/include/zlib/include/zlib.h presence... nochecking for /usr/include/zlib/include/zlib.h... nochecking /usr/include/include/zlib.h usability... nochecking /usr/include/include/zlib.h presence... nochecking for /usr/include/include/zlib.h... nochecking for inline... inlinechecking for int8_t... yeschecking for int16_t... yeschecking for int32_t... yeschecking for int64_t... yeschecking for uint8_t... yeschecking for uint16_t... yeschecking for uint32_t... yeschecking for uint64_t... yeschecking for u_int32_t... yeschecking for ssize_t... yeschecking for ANSI C header files... (cached) yeschecking for sys/wait.h that is POSIX.1 compatible... yeschecking fcntl.h usability... yeschecking fcntl.h presence... yeschecking for fcntl.h... yeschecking limits.h usability... yeschecking limits.h presence... yeschecking for limits.h... yeschecking for unistd.h... (cached) yeschecking signal.h usability... yeschecking signal.h presence... yeschecking for signal.h... yeschecking sys/socket.h usability... yeschecking sys/socket.h presence... yeschecking for sys/socket.h... yeschecking sys/select.h usability... yeschecking sys/select.h presence... yeschecking for sys/select.h... yeschecking for sys/types.h... (cached) yeschecking sys/time.h usability... yeschecking sys/time.h presence... yeschecking for sys/time.h... yeschecking sys/times.h usability... yeschecking sys/times.h presence... yeschecking for sys/times.h... yeschecking sys/resource.h usability... yeschecking sys/resource.h presence... yeschecking for sys/resource.h... yeschecking errno.h usability... yeschecking errno.h presence... yeschecking for errno.h... yeschecking arpa/inet.h usability... yeschecking arpa/inet.h presence... yeschecking for arpa/inet.h... yeschecking netinet/in.h usability... yeschecking netinet/in.h presence... yeschecking for netinet/in.h... yeschecking netdb.h usability... yeschecking netdb.h presence... yeschecking for netdb.h... yeschecking pthread.h usability... yeschecking pthread.h presence... yeschecking for pthread.h... yeschecking for string.h... (cached) yeschecking for strings.h... (cached) yeschecking sched.h usability... yeschecking sched.h presence... yeschecking for sched.h... yeschecking openssl/e_os.h usability... nochecking openssl/e_os.h presence... nochecking for openssl/e_os.h... nochecking openssl/e_os2.h usability... nochecking openssl/e_os2.h presence... nochecking for openssl/e_os2.h... nochecking for an ANSI C-conforming const... yeschecking for size_t... yeschecking whether time.h and sys/time.h may both be included... yeschecking return type of signal handlers... voidchecking for working alloca.h... yeschecking for alloca... yeschecking for strchr... yeschecking for memcpy... yeschecking for strncpy... yeschecking for strstr... yeschecking for strlen... yeschecking for strncasecmp... yeschecking for strncmp... yeschecking for socket... yeschecking for gethostbyname... yeschecking for snprintf... yeschecking for strdup... yeschecking for rand_r... yeschecking for localtime_r... yeschecking for gmtime_r... yeschecking for getipnodebyname... nochecking for freehostent... nochecking for getopt_long... yeschecking for poll... yeschecking for socket in -lsocket... nochecking for pthread_attr_init in -lpthread... yeschecking that generated files are newer than configure... doneconfigure: creating ./config.statusconfig.status: creating Makefileconfig.status: creating src/Makefileconfig.status: creating doc/Makefileconfig.status: creating html/Makefileconfig.status: creating include/Makefileconfig.status: creating include/joedog/Makefileconfig.status: creating utils/Makefileconfig.status: creating include/config.hconfig.status: executing depfiles commandsconfig.status: executing default-1 commandsconfig.status: executing default-2 commandsconfig.status: executing default-3 commandsconfig.status: executing default-4 commandsconfig.status: executing default-5 commandsconfig.status: executing default-6 commands
--------------------------------------------------------Configuration is complete
Run the following commands to complete the installation: make make install
For complete documentation: http://www.joedog.org--------------------------------------------------------[root@test03 siege-4.0.2]#

make

然后执行 make 

[root@test03 siege-4.0.2]# makeMaking all in .make[1]: Entering directory `/srv/siege-4.0.2''make[1]: Nothing to be done for `all-am''.make[1]: Leaving directory `/srv/siege-4.0.2''Making all in includemake[1]: Entering directory `/srv/siege-4.0.2/include''make all-recursivemake[2]: Entering directory `/srv/siege-4.0.2/include''Making all in joedogmake[3]: Entering directory `/srv/siege-4.0.2/include/joedog''make[3]: Nothing to be done for `all''.make[3]: Leaving directory `/srv/siege-4.0.2/include/joedog''make[3]: Entering directory `/srv/siege-4.0.2/include''make[3]: Leaving directory `/srv/siege-4.0.2/include''make[2]: Leaving directory `/srv/siege-4.0.2/include''make[1]: Leaving directory `/srv/siege-4.0.2/include''Making all in srcmake[1]: Entering directory `/srv/siege-4.0.2/src''gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c array.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c auth.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c base64.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c browser.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c cache.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c cookie.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c cookies.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c cfg.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c creds.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c crew.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c data.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c date.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c eval.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c ftp.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c getopt.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c getopt1.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c handler.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c hash.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c http.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c init.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c load.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c log.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c main.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c md5.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c memory.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c notify.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c page.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c parser.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c perl.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c response.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c sock.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c ssl.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c stralloc.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c timer.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c url.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c util.cgcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c version.c/bin/sh ../libtool --tag=CC --mode=link gcc -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -lpthread -o siege array.o auth.o base64.o browser.o cache.o cookie.o cookies.o cfg.o creds.o crew.o data.o date.o eval.o ftp.o getopt.o getopt1.o handler.o hash.o http.o init.o load.o log.o main.o md5.o memory.o notify.o page.o parser.o perl.o response.o sock.o ssl.o stralloc.o timer.o url.o util.o version.o mkdir .libsgcc -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -o siege array.o auth.o base64.o browser.o cache.o cookie.o cookies.o cfg.o creds.o crew.o data.o date.o eval.o ftp.o getopt.o getopt1.o handler.o hash.o http.o init.o load.o log.o main.o md5.o memory.o notify.o page.o parser.o perl.o response.o sock.o ssl.o stralloc.o timer.o url.o util.o version.o -lpthread make[1]: Leaving directory `/srv/siege-4.0.2/src''Making all in utilsmake[1]: Entering directory `/srv/siege-4.0.2/utils''make[1]: Nothing to be done for `all''.make[1]: Leaving directory `/srv/siege-4.0.2/utils''Making all in docmake[1]: Entering directory `/srv/siege-4.0.2/doc''make[1]: Nothing to be done for `all''.make[1]: Leaving directory `/srv/siege-4.0.2/doc''Making all in htmlmake[1]: Entering directory `/srv/siege-4.0.2/html''make[1]: Nothing to be done for `all''.make[1]: Leaving directory `/srv/siege-4.0.2/html''[root@test03 siege-4.0.2]#

make install

执行 make install

[root@test03 siege-4.0.2]# make installMaking install in .make[1]: Entering directory `/srv/siege-4.0.2''make[2]: Entering directory `/srv/siege-4.0.2''make[2]: Nothing to be done for `install-exec-am''.make[2]: Nothing to be done for `install-data-am''.make[2]: Leaving directory `/srv/siege-4.0.2''make[1]: Leaving directory `/srv/siege-4.0.2''Making install in includemake[1]: Entering directory `/srv/siege-4.0.2/include''Making install in joedogmake[2]: Entering directory `/srv/siege-4.0.2/include/joedog''make[3]: Entering directory `/srv/siege-4.0.2/include/joedog''make[3]: Nothing to be done for `install-exec-am''.make[3]: Nothing to be done for `install-data-am''.make[3]: Leaving directory `/srv/siege-4.0.2/include/joedog''make[2]: Leaving directory `/srv/siege-4.0.2/include/joedog''make[2]: Entering directory `/srv/siege-4.0.2/include''make[3]: Entering directory `/srv/siege-4.0.2/include''make[3]: Nothing to be done for `install-exec-am''.make[3]: Nothing to be done for `install-data-am''.make[3]: Leaving directory `/srv/siege-4.0.2/include''make[2]: Leaving directory `/srv/siege-4.0.2/include''make[1]: Leaving directory `/srv/siege-4.0.2/include''Making install in srcmake[1]: Entering directory `/srv/siege-4.0.2/src''make[2]: Entering directory `/srv/siege-4.0.2/src'' /bin/mkdir -p ''/usr/local/bin'' /bin/sh ../libtool --mode=install /usr/bin/install -c siege ''/usr/local/bin''/usr/bin/install -c siege /usr/local/bin/siegemake[2]: Nothing to be done for `install-data-am''.make[2]: Leaving directory `/srv/siege-4.0.2/src''make[1]: Leaving directory `/srv/siege-4.0.2/src''Making install in utilsmake[1]: Entering directory `/srv/siege-4.0.2/utils''make[2]: Entering directory `/srv/siege-4.0.2/utils''make install-exec-hookmake[3]: Entering directory `/srv/siege-4.0.2/utils''/bin/sh ../utils/mkinstalldirs /usr/local/bin /bin/sh ../libtool --mode=install /usr/bin/install -c bombardment /usr/local/bin/bombardment/usr/bin/install -c bombardment /usr/local/bin/bombardment /bin/sh ../libtool --mode=install /usr/bin/install -c siege2csv.pl /usr/local/bin/siege2csv.pl/usr/bin/install -c siege2csv.pl /usr/local/bin/siege2csv.pl /bin/sh ../libtool --mode=install /usr/bin/install -c siege.config /usr/local/bin/siege.config/usr/bin/install -c siege.config /usr/local/bin/siege.configmake[3]: Leaving directory `/srv/siege-4.0.2/utils''make[2]: Nothing to be done for `install-data-am''.make[2]: Leaving directory `/srv/siege-4.0.2/utils''make[1]: Leaving directory `/srv/siege-4.0.2/utils''Making install in docmake[1]: Entering directory `/srv/siege-4.0.2/doc''make[2]: Entering directory `/srv/siege-4.0.2/doc''make install-exec-hookmake[3]: Entering directory `/srv/siege-4.0.2/doc''make[3]: Leaving directory `/srv/siege-4.0.2/doc'' /bin/mkdir -p ''/usr/local/share/man/man1'' /usr/bin/install -c -m 644 siege.1 siege.config.1 bombardment.1 siege2csv.1 ''/usr/local/share/man/man1''make[2]: Leaving directory `/srv/siege-4.0.2/doc''make[1]: Leaving directory `/srv/siege-4.0.2/doc''Making install in htmlmake[1]: Entering directory `/srv/siege-4.0.2/html''make[2]: Entering directory `/srv/siege-4.0.2/html''make install-exec-hookmake[3]: Entering directory `/srv/siege-4.0.2/html''HTML pages not installedmake[3]: Leaving directory `/srv/siege-4.0.2/html''make[2]: Nothing to be done for `install-data-am''.make[2]: Leaving directory `/srv/siege-4.0.2/html''make[1]: Leaving directory `/srv/siege-4.0.2/html''[root@test03 siege-4.0.2]#

验证 Siege 是否安装成功

使用 siege -V 查看版本信息

[root@test03 siege-4.0.2]# siege -V[alert] Zip encoding disabled; siege requires zlib support to enable itSIEGE 4.0.2
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 FITNESSFOR A PARTICULAR PURPOSE.
[root@test03 siege-4.0.2]#

使用 siege -h 查看帮助信息

[root@test03 siege-4.0.2]# siege -h[alert] Zip encoding disabled; siege requires zlib support to enable itSIEGE 4.0.2Usage: siege [options] siege [options] URL siege -g URLOptions: -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 FITNESSFOR A PARTICULAR PURPOSE.
[root@test03 siege-4.0.2]#

从上述几个命令可以看出,Siege 已经安装了。

一个示例

安装完毕之后,没有示例怎么行,下面就给一个示例示范一下。

示例 ==> 并发请求指定 URL  http://download.joedog.org/

siege -c 5 -r 2 http://download.joedog.org/

参数说明-c 是并发量并发数为 5,  -r 是重复次数 重复 2 次

[root@test03 siege-4.0.2]# siege -c 5 -r 2 http://download.joedog.org/[alert] Zip encoding disabled; siege requires zlib support to enable it** SIEGE 4.0.2** Preparing 5 concurrent users for battle.The server is now under siege...HTTP/1.1 200 0.47 secs: 4583 bytes ==> GET /HTTP/1.1 200 0.48 secs: 4583 bytes ==> GET /HTTP/1.1 200 0.49 secs: 4583 bytes ==> GET /HTTP/1.1 200 0.49 secs: 4583 bytes ==> GET /HTTP/1.1 200 0.52 secs: 4583 bytes ==> GET /HTTP/1.1 200 0.40 secs: 225 bytes ==> GET /icons/folder.gifHTTP/1.1 200 0.43 secs: 225 bytes ==> GET /icons/folder.gifHTTP/1.1 200 0.44 secs: 225 bytes ==> GET /icons/folder.gifHTTP/1.1 200 0.45 secs: 225 bytes ==> GET /icons/folder.gifHTTP/1.1 200 0.42 secs: 225 bytes ==> GET /icons/folder.gifHTTP/1.1 200 0.43 secs: 2455 bytes ==> GET /images/pommie-icon.gifHTTP/1.1 200 0.43 secs: 2455 bytes ==> GET /images/pommie-icon.gifHTTP/1.1 200 0.41 secs: 2455 bytes ==> GET /images/pommie-icon.gifHTTP/1.1 200 0.46 secs: 2455 bytes ==> GET /images/pommie-icon.gifHTTP/1.1 200 0.46 secs: 2455 bytes ==> GET /images/pommie-icon.gifHTTP/1.1 200 0.37 secs: 4583 bytes ==> GET /HTTP/1.1 200 0.41 secs: 4583 bytes ==> GET /HTTP/1.1 200 0.44 secs: 4583 bytes ==> GET /HTTP/1.1 200 0.42 secs: 4583 bytes ==> GET /HTTP/1.1 200 0.45 secs: 225 bytes ==> GET /icons/folder.gifHTTP/1.1 200 0.45 secs: 225 bytes ==> GET /icons/folder.gifHTTP/1.1 200 0.42 secs: 225 bytes ==> GET /icons/folder.gifHTTP/1.1 200 0.43 secs: 225 bytes ==> GET /icons/folder.gifHTTP/1.1 200 0.42 secs: 2455 bytes ==> GET /images/pommie-icon.gifHTTP/1.1 200 0.40 secs: 2455 bytes ==> GET /images/pommie-icon.gifHTTP/1.1 200 0.43 secs: 2455 bytes ==> GET /images/pommie-icon.gifHTTP/1.1 200 0.43 secs: 2455 bytes ==> GET /images/pommie-icon.gifHTTP/1.1 200 2.25 secs: 4583 bytes ==> GET /HTTP/1.1 200 0.44 secs: 225 bytes ==> GET /icons/folder.gifHTTP/1.1 200 0.46 secs: 2455 bytes ==> GET /images/pommie-icon.gif
Transactions: 30 hitsAvailability: 100.00 %Elapsed time: 4.67 secsData transferred: 0.07 MBResponse time: 0.50 secsTransaction rate: 6.42 trans/secThroughput: 0.01 MB/secConcurrency: 3.21Successful transactions: 30Failed transactions: 0Longest transaction: 2.25Shortest transaction: 0.37
[root@test03 siege-4.0.2]#

结果展示:

对结果进行简单说明如下:

Transactions:		          30 hits        ## 完成处理数30
Availability: 100.00 % ## 可用,成功率100%
Elapsed time: 4.67 secs ## 耗时4.67
Data transferred: 0.07 MB ## 数据传输0.07MB
Response time: 0.50 secs ## 响应时间0.50
Transaction rate: 6.42 trans/sec ## 每秒完成6.42个处理
Throughput: 0.01 MB/sec ## 吞吐量,每秒传输0.01MB
Concurrency: 3.21 ## 实际最高并发连接数
Successful transactions: 30 ## 成功完成处理30
Failed transactions: 0 ## 失败0
Longest transaction: 2.25 ## 每次传输所花最长时间
Shortest transaction: 0.37 ## 每次传输所花最短时间

至此,CentOS 安装 Web 性能测试工具 Siege,并给出一个简单的示例就完成了。


后续,将给出 Siege 不同参数的使用实例,更多地去了解 Siege。

本文分享自微信公众号 - 孟君的编程札记(gh_0f0f5e0ae1de)。
如有侵权,请联系 support@oschina.cn 删除。
本文参与 “OSC 源创计划”,欢迎正在阅读的你也加入,一起分享。

Linux下四款Web服务器压力测试工具(http_load、webbench、ab、siege)

Linux下四款Web服务器压力测试工具(http_load、webbench、ab、siege)

一、http_load

程序非常小,解压后也不到100K

http_load以并行复用的方式运行,用以测试web服务器的吞吐量与负载。但是它不同于大多数压力测试工具,它可以以一个单一的进程运行,一般不会把客户机搞死。还可以测试HTTPS类的网站请求。


下载地址:http://soft.vpser.net/test/http_load/http_load-12mar2006.tar.gz


安装

#tar zxvf http_load-12mar2006.tar.gz

#cd http_load-12mar2006

#make && make install


<!–more–>


命令格式:http_load  -p 并发访问进程数  -s 访问时间  需要访问的URL文件

参数其实可以自由组合,参数之间的选择并没有什么限制。比如你写成http_load -parallel 5 -seconds

300 urls.txt也是可以的。我们把参数给大家简单说明一下。

-parallel 简写-p :含义是并发的用户进程数。

-fetches 简写-f :含义是总计的访问次数

-rate    简写-p :含义是每秒的访问频率

-seconds简写-s :含义是总计的访问时间

准备URL文件:urllist.txt,文件格式是每行一个URL,URL最好超过50-100个测试效果比较好.文件格式如下:

http://www.vpser.net/uncategorized/choose-vps.html

http://www.vpser.net/vps-cp/hypervm-tutorial.html

http://www.vpser.net/coupons/diavps-april-coupons.html

http://www.vpser.net/security/vps-backup-web-mysql.html

例如:

http_load -p 30 -s 60  urllist.txt

参数了解了,我们来看运行一条命令来看看它的返回结果

命令:% ./http_load -rate 5 -seconds 10 urls说明执行了一个持续时间10秒的测试,每秒的频率为5。

49 fetches, 2 max parallel, 289884 bytes, in 10.0148 seconds5916 mean bytes/connection4.89274

fetches/sec, 28945.5 bytes/secmsecs/connect: 28.8932 mean, 44.243 max, 24.488 minmsecs/first

-response: 63.5362 mean, 81.624 max, 57.803 minHTTP response codes: code 200 — 49


结果分析:

1.49 fetches, 2 max parallel, 289884 bytes, in 10.0148 seconds

说明在上面的测试中运行了49个请求,最大的并发进程数是2,总计传输的数据是289884bytes,运行的时间是10.0148秒

2.5916 mean bytes/connection说明每一连接平均传输的数据量289884/49=5916

3.4.89274 fetches/sec, 28945.5 bytes/sec

说明每秒的响应请求为4.89274,每秒传递的数据为28945.5 bytes/sec

4.msecs/connect: 28.8932 mean, 44.243 max, 24.488 min说明每连接的平均响应时间是28.8932 msecs,最大的响应时间44.243 msecs,最小的响应时间24.488 msecs

5.msecs/first-response: 63.5362 mean, 81.624 max, 57.803 min

6、HTTP response codes: code 200 — 49     说明打开响应页面的类型,如果403的类型过多,那可能


要注意是否系统遇到了瓶颈。

特殊说明:

测试结果中主要的指标是 fetches/sec、msecs/connect 这个选项,即服务器每秒能够响应的查询次数,用这个指标来衡量性能。似乎比 apache的ab准确率要高一些,也更有说服力一些。

Qpt-每秒响应用户数和response time,每连接响应用户时间。

测试的结果主要也是看这两个值。当然仅有这两个指标并不能完成对性能的分析,我们还需要对服务器的cpu、men进行分析,才能得出结论


二、webbench


webbench是Linux下的一个网站压力测试工具,最多可以模拟3万个并发连接去测试网站的负载能力。下载地址可以到google搜,我这里给出一个

下载地址:http://soft.vpser.net/test/webbench/webbench-1.5.tar.gz

这个程序更小,解压后不到50K,呵呵


安装

#tar zxvf webbench-1.5.tar.gz

#cd webbench-1.5

#make && make install

会在当前目录生成webbench可执行文件,直接可以使用了


用法:

webbench -c 并发数 -t 运行测试时间 URL

如:

webbench -c 5000 -t 120 http://www.163.com


三、ab


选项


-A auth-username:password

对服务器提供BASIC认证信任。 用户名和密码由一个:隔开,并以base64编码形式发送。 无论服务器是否需要(即, 是否发送了401认证需求代码),此字符串都会被发送。

-c concurrency

一次产生的请求个数。默认是一次一个。

-C cookie-name=value

对请求附加一个Cookie:行。 其典型形式是name=value的一个参数对。 此参数可以重复。

-d

不显示”percentage served within XX [ms] table”的消息(为以前的版本提供支持)。

-e csv-file

产生一个以逗号分隔的(CSV)文件, 其中包含了处理每个相应百分比的请求所需要(从1%到100%)的相应百分比的(以微妙为单位)时间。 由于这种格式已经“二进制化”,所以比’gnuplot’格式更有用。

-g gnuplot-file

把所有测试结果写入一个’gnuplot’或者TSV (以Tab分隔的)文件。 此文件可以方便地导入到Gnuplot, IDL, Mathematica, Igor甚至Excel中。 其中的第一行为标题。

-h

显示使用方法。

-H custom-header

对请求附加额外的头信息。 此参数的典型形式是一个有效的头信息行,其中包含了以冒号分隔的字段和值的对 (如, “Accept-Encoding: zip/zop;8bit”).

-i

执行HEAD请求,而不是GET。

-k

启用HTTP KeepAlive功能,即, 在一个HTTP会话中执行多个请求。 默认时,不启用KeepAlive功能.

-n requests

在测试会话中所执行的请求个数。 默认时,仅执行一个请求,但通常其结果不具有代表意义。

-p POST-file

包含了需要POST的数据的文件.

-P proxy-auth-username:password

对一个中转代理提供BASIC认证信任。 用户名和密码由一个:隔开,并以base64编码形式发送。 无论服务器是否需要(即, 是否发送了401认证需求代码),此字符串都会被发送。

-q

如果处理的请求数大于150, ab每处理大约10%或者100个请求时,会在stderr输出一个进度计数。 此-q标记可以抑制这些信息。

-s

用于编译中(ab -h会显示相关信息)使用了SSL的受保护的https, 而不是http协议的时候。此功能是实验性的,也是很简陋的。最好不要用。

-S

不显示中值和标准背离值, 而且在均值和中值为标准背离值的1到2倍时,也不显示警告或出错信息。 默认时,会显示 最小值/均值/最大值等数值。(为以前的版本提供支持).

-t timelimit

测试所进行的最大秒数。其内部隐含值是-n 50000。 它可以使对服务器的测试限制在一个固定的总时间以内。默认时,没有时间限制。

-T content-type

POST数据所使用的Content-type头信息。

-v verbosity

设置显示信息的详细程度 – 4或更大值会显示头信息, 3或更大值可以显示响应代码(404, 200等), 2或更大值可以显示警告和其他信息。

-V

显示版本号并退出。

-w

以HTML表的格式输出结果。默认时,它是白色背景的两列宽度的一张表。

-x <table>-attributes

设置<table>属性的字符串。 此属性被填入<table 这里 >.

-X proxy[:port]

对请求使用代理服务器。

-y <tr>-attributes

设置<tr>属性的字符串.

-z <td>-attributes

设置<td>属性的字符串.


缺陷

程序中有各种静态声明的固定长度的缓冲区。 另外,对命令行参数、服务器的响应头和其他外部输入的解析也很简单,这可能会有不良后果。


它没有完整地实现HTTP/1.x; 仅接受某些’预想’的响应格式。 strstr(3)的频繁使用可能会带来性能问题,即, 你可能是在测试ab而不是服务器的性能。


 


参数很多,一般我们用 -c 和 -n 参数就可以了. 例如:


./ab -c 1000 -n 1000 http://127.0.0.1/index.php


这个表示同时处理1000个请求并运行1000次index.php文件.

#/usr/local/xiaobai/apache2054/bin/ab -c 1000 -n 1000 http://127.0.0.1/index.html.zh-cn.gb2312

This is ApacheBench, Version 2.0.41-dev <$Revision: 1.121.2.12 $> apache-2.0

Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/

Copyright (c) 1998-2002 The Apache Software Foundation, http://www.apache.org/


Benchmarking 127.0.0.1 (be patient)

Completed 100 requests

Completed 200 requests

Completed 300 requests

Completed 400 requests

Completed 500 requests

Completed 600 requests

Completed 700 requests

Completed 800 requests

Completed 900 requests

Finished 1000 requests


Server Software: Apache/2.0.54

//平台apache 版本2.0.54

Server Hostname: 127.0.0.1

//服务器主机名

Server Port: 80

//服务器端口


Document Path: /index.html.zh-cn.gb2312

//测试的页面文档

Document Length: 1018 bytes

//文档大小


Concurrency Level: 1000

//并发数

Time taken for tests: 8.188731 seconds

//整个测试持续的时间

Complete requests: 1000

//完成的请求数量

Failed requests: 0

//失败的请求数量

Write errors: 0


Total transferred: 1361581 bytes

//整个场景中的网络传输量

HTML transferred: 1055666 bytes

//整个场景中的HTML内容传输量

Requests per second: 122.12 [#/sec] (mean)

//大家最关心的指标之一,相当于 LR 中的 每秒事务数 ,后面括号中的 mean 表示这是一个平均值

Time per request: 8188.731 [ms] (mean)

//大家最关心的指标之二,相当于 LR 中的 平均事务响应时间 ,后面括号中的 mean 表示这是一个平均值

Time per request: 8.189 [ms] (mean, across all concurrent requests)

//每个请求实际运行时间的平均值

Transfer rate: 162.30 [Kbytes/sec] received

//平均每秒网络上的流量,可以帮助排除是否存在网络流量过大导致响应时间延长的问题


Connection Times (ms)

min mean[+/-sd] median max

Connect: 4 646 1078.7 89 3291

Processing: 165 992 493.1 938 4712

Waiting: 118 934 480.6 882 4554

Total: 813 1638 1338.9 1093 7785

//网络上消耗的时间的分解,各项数据的具体算法还不是很清楚


Percentage of the requests served within a certain time (ms)

50% 1093

66% 1247

75% 1373

80% 1493

90% 4061

95% 4398

98% 5608

99% 7368

100% 7785 (longest request)

//整个场景中所有请求的响应情况。在场景中每个请求都有一个响应时间,其中50%的用户响应时间小于1093 毫秒,60% 的用户响应时间小于1247 毫秒,最大的响应时间小于7785 毫秒


由于对于并发请求,cpu实际上并不是同时处理的,而是按照每个请求获得的时间片逐个轮转处理的,所以基本上第一个Time per request时间约等于第二个Time per request时间乘以并发请求数


四、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,它会从里面随机访问的。


example.url内容:


http://www.licess.cn

http://www.vpser.net

http://soft.vpser.net


结果说明

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 //每次传输所花最短时间


mac siege 测压

mac siege 测压

mac 下有很多的测压工具,不过我个人比较倾向于小巧的 siege,在 mac 上,安装和使用都是很方便的。需要注意的是,必须保证 open file 足够大,不然会报 too many file open 错误。

查看和修改 open file 值

使用 ulimit -n 10000 可以修改该值。不过这种修改并不是永久的,关闭终端会话,又会恢复回来。

安装

mac 安装 siege 很简单,brew install siege 即可。

使用

siege -h 查看 siege 的使用帮助

常用使用方式为

siege -c 1000 -t 5s URL
siege -c 1000 -t 5s -f  URL_File_Name

第一种是对指定站点进行压测,第二种是对文件中包含的若干 URL 进行批量测试。

-c 并发数
-t 压力测试时间,可以在时间后加单位,秒(10S),分钟(10M),小时(10H)
-r 重复次数,与-t表达方式不同,但含义相同,不能与-t同时存在
-f 包含URL的文本名字
-b BENCHMARK模式,请求之间无需延迟
全部参数详解
-C,或–config 在屏幕上打印显示出当前的配置,配置是包括在他的配置文件$HOME/.siegerc中,可以编辑里面的参数,这样每次siege 都会按照它运行.
-v 运行时能看到详细的运行信息
-c n,或–concurrent=n 模拟有n个用户在同时访问,n不要设得太大,因为越大,siege 消耗本地机器的资源越多
-i,–internet 随机访问urls.txt中的url列表项,以此模拟真实的访问情况(随机性),当urls.txt存在是有效
-d n,–delay=n hit每个url之间的延迟,在0-n之间
-r n,–reps=n 重复运行测试n次,不能与 -t同时存在
-t n,–time=n 持续运行siege的时间,可带单位,秒(S),分(M),时(H),不带则默认为M
-l 运行结束,将统计数据保存到日志文件中siege .log,一般位于/usr/local/var/siege .log中,也可在.siegerc中自定义
-R SIEGERC,–rc=SIEGERC 指定用特定的siege 配置文件来运行,默认的为$HOME/.siegerc
-f FILE, –file=FILE 指定用特定的urls文件运行siege ,默认为urls.txt,位于siege 安装目录下的etc/urls.txt
-u URL,–url=URL 测试指定的一个URL,对它进行”siege “,此选项会忽略有关urls文件的设定

urls.txt文件:是很多行待测试URL的列表以换行符断开,格式为:
[protocol://]host.domain.com[:port][path/to/file]
用法举例

(以下内容为转载)

siege -c 300 -r 100 -f url.txt

说明:-c 是并发量,-r 是重复次数。url.txt 就是一个文本文件,每行都是一个 url,它会从里面随机访问的。

url.txt 内容:

http://192.168.80.166/01.jpg
http://192.168.80.166/02.jpg
http://192.168.80.166/03.jpg
http://192.168.80.166/04.jpg
http://192.168.80.166/05.jpg
http://192.168.80.166/06.jpg

结果如图:

结果说明
Transactions: 30000 hits //完成30000次处理
Availability: 100.00 % //100.00 % 成功率
Elapsed time: 68.59 secs //总共使用时间
Data transferred: 817.76 MB //共数据传输 817.76 MB
Response time: 0.04 secs //响应时间,显示网络连接的速度
Transaction rate: 437.38 trans/sec //平均每秒完成 437.38 次处理
Throughput: 11.92 MB/sec //平均每秒传送数据
Concurrency: 17.53 //实际最高并发连接数
Successful transactions: 30000 //成功处理次数
Failed transactions: 0 //失败处理次数
Longest transaction: 3.12 //每次传输所花最长时间
Shortest transaction: 0.00 //每次传输所花最短时间

我们今天的关于Siege 2.73b1 发布,Web 压力测试工具web压力测试软件的分享就到这里,谢谢您的阅读,如果想了解更多关于ab,webbench,Siege,http_load,Web Application Stress、CentOS 上安装 Web 性能测试工具 Siege & 示例、Linux下四款Web服务器压力测试工具(http_load、webbench、ab、siege)、mac siege 测压的相关信息,可以在本站进行搜索。

本文标签:

上一篇10 个技巧让你的 RESTful Web 服务更加实用

下一篇elFinder 2.0 RC1 发布,Web 文件管理器(web版文件管理系统)