如果您想了解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压力测试软件)
- 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 发布,该版本修复了 kfreebsd-* 内核下的编译问题,同时利用 /dev/urandom 来提升随机性。
Siege是一个压力测试和评测工具,设计用于WEB开发这评估应用在压力下的承受能力:可以根据配置对一个WEB站点进行多用户的并发访问,记录每个用户所有请求过程的相应时间,并在一定数量的并发访问下重复进行。
测试方法请看这里。
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 的步骤,并对安装过程中遇到的问题进行解决
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.gz
Resolving download.joedog.org... 52.24.24.107
Connecting to download.joedog.org|52.24.24.107|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 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.h
siege-4.0.2/src/handler.c
siege-4.0.2/src/browser.c
siege-4.0.2/src/handler.h
siege-4.0.2/src/base64.h
siege-4.0.2/src/cookie.h
siege-4.0.2/src/timer.c
siege-4.0.2/src/main.c
siege-4.0.2/src/init.c
siege-4.0.2/src/util.c
siege-4.0.2/src/auth.h
siege-4.0.2/src/cookies.h
siege-4.0.2/src/data.h
siege-4.0.2/src/stralloc.c
siege-4.0.2/src/creds.c
siege-4.0.2/src/page.c
siege-4.0.2/src/cache.c
siege-4.0.2/src/data.c
siege-4.0.2/src/perl.h
siege-4.0.2/src/cookies.c
siege-4.0.2/src/http.c
siege-4.0.2/src/hash.c
siege-4.0.2/src/util.h
siege-4.0.2/src/response.h
siege-4.0.2/src/response.c
siege-4.0.2/src/stralloc.h
siege-4.0.2/src/ssl.c
siege-4.0.2/src/ftp.c
siege-4.0.2/src/date.h
siege-4.0.2/src/hash.h
siege-4.0.2/src/init.h
siege-4.0.2/src/page.h
siege-4.0.2/src/url.h
siege-4.0.2/src/date.c
siege-4.0.2/src/notify.h
siege-4.0.2/src/parser.c
siege-4.0.2/src/load.h
siege-4.0.2/src/load.c
siege-4.0.2/src/http.h
siege-4.0.2/src/ansidecl.h
siege-4.0.2/src/md5.c
siege-4.0.2/src/ssl.h
siege-4.0.2/src/memory.h
siege-4.0.2/src/array.c
siege-4.0.2/src/browser.h
siege-4.0.2/src/getopt.c
siege-4.0.2/src/version.c
siege-4.0.2/src/array.h
siege-4.0.2/src/Makefile.in
siege-4.0.2/src/eval.c
siege-4.0.2/src/parser.h
siege-4.0.2/src/setup.h
siege-4.0.2/src/log.h
siege-4.0.2/src/cache.h
siege-4.0.2/src/crew.c
siege-4.0.2/src/creds.h
siege-4.0.2/src/log.c
siege-4.0.2/src/sock.c
siege-4.0.2/src/memory.c
siege-4.0.2/src/crew.h
siege-4.0.2/src/version.h
siege-4.0.2/src/ftp.h
siege-4.0.2/src/cfg.c
siege-4.0.2/src/url.c
siege-4.0.2/src/eval.h
siege-4.0.2/src/md5.h
siege-4.0.2/src/perl.c
siege-4.0.2/src/Makefile.am
siege-4.0.2/src/sock.h
siege-4.0.2/src/cfg.h
siege-4.0.2/src/getopt1.c
siege-4.0.2/src/auth.c
siege-4.0.2/src/notify.c
siege-4.0.2/src/base64.c
siege-4.0.2/src/cookie.c
siege-4.0.2/COPYING
siege-4.0.2/utils/
siege-4.0.2/utils/compile
siege-4.0.2/utils/config.guess
siege-4.0.2/utils/install-sh
siege-4.0.2/utils/config.sub
siege-4.0.2/utils/bombardment.in
siege-4.0.2/utils/ltmain.sh
siege-4.0.2/utils/siege2csv.in
siege-4.0.2/utils/bootstrap
siege-4.0.2/utils/missing
siege-4.0.2/utils/mkstamp
siege-4.0.2/utils/Makefile.in
siege-4.0.2/utils/siege.config.in
siege-4.0.2/utils/Makefile.am
siege-4.0.2/utils/mkinstalldirs
siege-4.0.2/utils/mdate-sh
siege-4.0.2/doc/
siege-4.0.2/doc/siege2csv.1.in
siege-4.0.2/doc/urls.txt
siege-4.0.2/doc/Makefile.in
siege-4.0.2/doc/siege.config.1.in
siege-4.0.2/doc/siege2csv.pod
siege-4.0.2/doc/bombardment.pod
siege-4.0.2/doc/siege.pod
siege-4.0.2/doc/bombardment.1.in
siege-4.0.2/doc/siege.config.pod
siege-4.0.2/doc/siege.1.in
siege-4.0.2/doc/Makefile.am
siege-4.0.2/doc/siegerc.in
siege-4.0.2/INSTALL
siege-4.0.2/include/
siege-4.0.2/include/joedog/
siege-4.0.2/include/joedog/path.h
siege-4.0.2/include/joedog/getopt.h
siege-4.0.2/include/joedog/Makefile.in
siege-4.0.2/include/joedog/defs.h
siege-4.0.2/include/joedog/boolean.h
siege-4.0.2/include/joedog/Makefile.am
siege-4.0.2/include/config.h.in
siege-4.0.2/include/Makefile.in
siege-4.0.2/include/Makefile.am
siege-4.0.2/README.md
siege-4.0.2/install-sh
siege-4.0.2/configure.ac
siege-4.0.2/aclocal.m4
siege-4.0.2/acinclude.m4
siege-4.0.2/ChangeLog
siege-4.0.2/Makefile.in
siege-4.0.2/html/
siege-4.0.2/html/basic.php
siege-4.0.2/html/README
siege-4.0.2/html/etag.php
siege-4.0.2/html/cookie-expire.php
siege-4.0.2/html/cache-control.php
siege-4.0.2/html/Makefile.in
siege-4.0.2/html/login.php
siege-4.0.2/html/Makefile.am
siege-4.0.2/configure
siege-4.0.2/Makefile.am
siege-4.0.2/acspecific.m4
siege-4.0.2/AUTHORS
[root@test03 srv]#
configure
进入解压缩后 siege 目录,执行./configure
[root@test03 srv]# cd siege-4.0.2
[root@test03 siege-4.0.2]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for style of include used by make... GNU
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/srv/siege-4.0.2'':
configure: error: no acceptable C compiler found in $PATH
See `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 gcc
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
ISO | 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 M
Installing 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 M
Installed size: 39 M
Is this ok [y/N]:
选择 y
Is this ok [y/N]: y
Downloading 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_debug
Running Transaction Test
Transaction Test Succeeded
Running 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]# ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... none
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) none
checking for a sed that does not truncate output... /bin/sed
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking for g77... no
checking for xlf... no
checking for f77... no
checking for frt... no
checking for pgf77... no
checking for cf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for xlf95... no
checking for f95... no
checking for fort... no
checking for ifort... no
checking for ifc... no
checking for efc... no
checking for pgfortran... no
checking for pgf95... no
checking for lf95... no
checking for ftn... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether accepts -g... no
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
appending configuration tag "F77" to libtool
checking for perl... /usr/bin/perl
checking for a POSIX-compliant shell... /bin/sh
checking whether make sets $(MAKE)... (cached) yes
checking for buggy pthread mutex initializers... no
checking for dlopen() in -ldld... no
checking for dlopen() in -ldl... yes
checking for random device... yes
checking for ssl support... yes
checking /include/openssl/opensslv.h usability... no
checking /include/openssl/opensslv.h presence... no
checking for /include/openssl/opensslv.h... no
checking /usr/include/openssl/opensslv.h usability... no
checking /usr/include/openssl/opensslv.h presence... no
checking for /usr/include/openssl/opensslv.h... no
checking /usr/local/include/openssl/opensslv.h usability... no
checking /usr/local/include/openssl/opensslv.h presence... no
checking for /usr/local/include/openssl/opensslv.h... no
checking /usr/local/ssl/include/openssl/opensslv.h usability... no
checking /usr/local/ssl/include/openssl/opensslv.h presence... no
checking for /usr/local/ssl/include/openssl/opensslv.h... no
checking /usr/pkg/include/openssl/opensslv.h usability... no
checking /usr/pkg/include/openssl/opensslv.h presence... no
checking for /usr/pkg/include/openssl/opensslv.h... no
checking /usr/lib/ssl/include/openssl/opensslv.h usability... no
checking /usr/lib/ssl/include/openssl/opensslv.h presence... no
checking for /usr/lib/ssl/include/openssl/opensslv.h... no
checking /usr/include/ssl/include/openssl/opensslv.h usability... no
checking /usr/include/ssl/include/openssl/opensslv.h presence... no
checking for /usr/include/ssl/include/openssl/opensslv.h... no
checking /usr/include/include/openssl/opensslv.h usability... no
checking /usr/include/include/openssl/opensslv.h presence... no
checking for /usr/include/include/openssl/opensslv.h... no
checking for zlib support... yes
checking /include/zlib.h usability... no
checking /include/zlib.h presence... no
checking for /include/zlib.h... no
checking /usr/include/zlib.h usability... no
checking /usr/include/zlib.h presence... no
checking for /usr/include/zlib.h... no
checking /usr/local/include/zlib.h usability... no
checking /usr/local/include/zlib.h presence... no
checking for /usr/local/include/zlib.h... no
checking /usr/local/ssl/include/zlib.h usability... no
checking /usr/local/ssl/include/zlib.h presence... no
checking for /usr/local/ssl/include/zlib.h... no
checking /usr/pkg/include/zlib.h usability... no
checking /usr/pkg/include/zlib.h presence... no
checking for /usr/pkg/include/zlib.h... no
checking /usr/lib/zlib/include/zlib.h usability... no
checking /usr/lib/zlib/include/zlib.h presence... no
checking for /usr/lib/zlib/include/zlib.h... no
checking /usr/include/zlib/include/zlib.h usability... no
checking /usr/include/zlib/include/zlib.h presence... no
checking for /usr/include/zlib/include/zlib.h... no
checking /usr/include/include/zlib.h usability... no
checking /usr/include/include/zlib.h presence... no
checking for /usr/include/include/zlib.h... no
checking for inline... inline
checking for int8_t... yes
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for u_int32_t... yes
checking for ssize_t... yes
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for unistd.h... (cached) yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for sys/types.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/times.h usability... yes
checking sys/times.h presence... yes
checking for sys/times.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sched.h usability... yes
checking sched.h presence... yes
checking for sched.h... yes
checking openssl/e_os.h usability... no
checking openssl/e_os.h presence... no
checking for openssl/e_os.h... no
checking openssl/e_os2.h usability... no
checking openssl/e_os2.h presence... no
checking for openssl/e_os2.h... no
checking for an ANSI C-conforming const... yes
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking return type of signal handlers... void
checking for working alloca.h... yes
checking for alloca... yes
checking for strchr... yes
checking for memcpy... yes
checking for strncpy... yes
checking for strstr... yes
checking for strlen... yes
checking for strncasecmp... yes
checking for strncmp... yes
checking for socket... yes
checking for gethostbyname... yes
checking for snprintf... yes
checking for strdup... yes
checking for rand_r... yes
checking for localtime_r... yes
checking for gmtime_r... yes
checking for getipnodebyname... no
checking for freehostent... no
checking for getopt_long... yes
checking for poll... yes
checking for socket in -lsocket... no
checking for pthread_attr_init in -lpthread... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating doc/Makefile
config.status: creating html/Makefile
config.status: creating include/Makefile
config.status: creating include/joedog/Makefile
config.status: creating utils/Makefile
config.status: creating include/config.h
config.status: executing depfiles commands
config.status: executing default-1 commands
config.status: executing default-2 commands
config.status: executing default-3 commands
config.status: executing default-4 commands
config.status: executing default-5 commands
config.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]# make
Making 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 include
make[1]: Entering directory `/srv/siege-4.0.2/include''
make all-recursive
make[2]: Entering directory `/srv/siege-4.0.2/include''
Making all in joedog
make[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 src
make[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.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c auth.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c base64.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c browser.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c cache.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c cookie.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c cookies.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c cfg.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c creds.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c crew.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c data.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c date.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c eval.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c ftp.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c getopt.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c getopt1.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c handler.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c hash.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c http.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c init.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c load.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c log.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c main.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c md5.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c memory.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c notify.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c page.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c parser.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c perl.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c response.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c sock.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c ssl.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c stralloc.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c timer.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c url.c
gcc -DHAVE_CONFIG_H -I. -I../include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -W -Wall -Wunused-value -g -O2 -c util.c
gcc -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 .libs
gcc -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 utils
make[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 doc
make[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 html
make[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 install
Making 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 include
make[1]: Entering directory `/srv/siege-4.0.2/include''
Making install in joedog
make[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 src
make[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/siege
make[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 utils
make[1]: Entering directory `/srv/siege-4.0.2/utils''
make[2]: Entering directory `/srv/siege-4.0.2/utils''
make install-exec-hook
make[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.config
make[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 doc
make[1]: Entering directory `/srv/siege-4.0.2/doc''
make[2]: Entering directory `/srv/siege-4.0.2/doc''
make install-exec-hook
make[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 html
make[1]: Entering directory `/srv/siege-4.0.2/html''
make[2]: Entering directory `/srv/siege-4.0.2/html''
make install-exec-hook
make[3]: Entering directory `/srv/siege-4.0.2/html''
HTML pages not installed
make[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 it
SIEGE 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 FITNESS
FOR 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 it
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.
[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.gif
HTTP/1.1 200 0.43 secs: 225 bytes ==> GET /icons/folder.gif
HTTP/1.1 200 0.44 secs: 225 bytes ==> GET /icons/folder.gif
HTTP/1.1 200 0.45 secs: 225 bytes ==> GET /icons/folder.gif
HTTP/1.1 200 0.42 secs: 225 bytes ==> GET /icons/folder.gif
HTTP/1.1 200 0.43 secs: 2455 bytes ==> GET /images/pommie-icon.gif
HTTP/1.1 200 0.43 secs: 2455 bytes ==> GET /images/pommie-icon.gif
HTTP/1.1 200 0.41 secs: 2455 bytes ==> GET /images/pommie-icon.gif
HTTP/1.1 200 0.46 secs: 2455 bytes ==> GET /images/pommie-icon.gif
HTTP/1.1 200 0.46 secs: 2455 bytes ==> GET /images/pommie-icon.gif
HTTP/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.gif
HTTP/1.1 200 0.45 secs: 225 bytes ==> GET /icons/folder.gif
HTTP/1.1 200 0.42 secs: 225 bytes ==> GET /icons/folder.gif
HTTP/1.1 200 0.43 secs: 225 bytes ==> GET /icons/folder.gif
HTTP/1.1 200 0.42 secs: 2455 bytes ==> GET /images/pommie-icon.gif
HTTP/1.1 200 0.40 secs: 2455 bytes ==> GET /images/pommie-icon.gif
HTTP/1.1 200 0.43 secs: 2455 bytes ==> GET /images/pommie-icon.gif
HTTP/1.1 200 0.43 secs: 2455 bytes ==> GET /images/pommie-icon.gif
HTTP/1.1 200 2.25 secs: 4583 bytes ==> GET /
HTTP/1.1 200 0.44 secs: 225 bytes ==> GET /icons/folder.gif
HTTP/1.1 200 0.46 secs: 2455 bytes ==> GET /images/pommie-icon.gif
Transactions: 30 hits
Availability: 100.00 %
Elapsed time: 4.67 secs
Data transferred: 0.07 MB
Response time: 0.50 secs
Transaction rate: 6.42 trans/sec
Throughput: 0.01 MB/sec
Concurrency: 3.21
Successful transactions: 30
Failed transactions: 0
Longest transaction: 2.25
Shortest 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)
一、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 上,安装和使用都是很方便的。需要注意的是,必须保证 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 测压的相关信息,可以在本站进行搜索。
本文标签: