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

简介: 题记:压力和性能测试工具很多,下文讨论的是我觉得比较容易上手,用的比较多的三种http_load下载地址:http://www.acme.com/software/http_load/http_load-12mar2006.tar.gz程序非常小,解压后也不到100K 居家旅行 携带方便 呵呵http_load以并行复用的方式运行,用以测试web服务器的吞吐量与负载。
题记:压力和性能测试工具很多,下文讨论的是我觉得比较容易上手,用的比较多的三种

http_load

下载地址: http://www.acme.com/software/http_load/http_load-12mar2006.tar.gz

程序非常小,解压后也不到100K 居家旅行 携带方便 呵呵

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

命令格式:http_load  -p 并发访问进程数  -s 访问时间  需要访问的URL文件
例如:
引用
http_load -p 30 -s 60  urllist.txt
准备URL文件:tst.list,文件格式是每行一个URL,URL最好超过50-100个测试效果比较好,另外,测试结果中主要的指标是 fetches/sec 这个选项,即服务器每秒能够响应的查询次数,用这个指标来衡量性能。似乎比 apache的ab准确率要高一些,也更有说服力一些。

官方的例子:
引用

% ./http_load -rate 10 -seconds 60 urllist.txt
49 fetches, 4 max parallel, 289884 bytes, in 10.0148 seconds
5916 mean bytes/connection
4.89274 fetches/sec, 28945.5 bytes/sec
msecs/connect: 28.8932 mean, 44.243 max, 24.488 min
msecs/first-response: 63.5362 mean, 81.624 max, 57.803 min


4.89274 fetches/sec 这个值得就是说服务器每秒能够响应的查询次数为4.8左右
这个值得是根据 49 fetches / 10.0148 seconds 秒计算出来的



webbench

webbench是Linux下的一个网站压力测试工具,最多可以模拟3万个并发连接去测试网站的负载能力。下载地址可以到baidu google搜,我这里给出一个
下载地址: http://cid-9601b7b7f2063d42.skydrive.live.com/self.aspx/Public/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.askwan.com



ab
ab是apache自带的一款功能强大的测试工具
安装了apache一般就自带了,
用法可以查看它的说明
引用
$ ./ab
./ab: wrong number of arguments
Usage: ./ab [options] [http://]hostname[:port]/path
Options are:
-n requests Number of requests to perform
-c concurrency Number of multiple requests to make
-t timelimit Seconds to max. wait for responses
-p postfile File containing data to POST
-T content-type Content-type header for POSTing
-v verbosity How much troubleshooting info to print
-w Print out results in HTML tables
-i Use HEAD instead of GET
-x attributes String to insert as table attributes
-y attributes String to insert as tr attributes
-z attributes String to insert as td or th attributes
-C attribute Add cookie, eg. 'Apache=1234. (repeatable)
-H attribute Add Arbitrary header line, eg. 'Accept-Encoding: gzip'
Inserted after all normal header lines. (repeatable)
-A attribute Add Basic WWW Authentication, the attributes
are a colon separated username and password.
-P attribute Add Basic Proxy Authentication, the attributes
are a colon separated username and password.
-X proxy:port Proxyserver and port number to use
-V Print version number and exit
-k Use HTTP KeepAlive feature
-d Do not show percentiles served table.
-S Do not show confidence estimators and warnings.
-g filename Output collected data to gnuplot format file.
-e filename Output CSV file with percentages served
-h Display usage information (this message)


参数众多,一般我们用到的是-n 和-c
例如:
./ab -c 1000 -n 100 http://www.askwan.com/index.php

这个表示同时处理1000个请求并运行100次index.php文件.
相关文章
|
9月前
|
安全 Linux iOS开发
Burp Suite Professional 2025.10 发布 - Web 应用安全、测试和扫描
Burp Suite Professional 2025.10 (macOS, Linux, Windows) - Web 应用安全、测试和扫描
567 3
|
9月前
|
Java 测试技术 网络安全
Burp Suite Professional 2025.10 for Windows x64 - 领先的 Web 渗透测试软件
Burp Suite Professional 2025.10 for Windows x64 - 领先的 Web 渗透测试软件
389 0
Burp Suite Professional 2025.10 for Windows x64 - 领先的 Web 渗透测试软件
|
10月前
|
安全 NoSQL Shell
web渗透-SSRF漏洞及discuz论坛网站测试
SSRF(服务器端请求伪造)是一种安全漏洞,攻击者可诱使服务端发起任意请求,进而探测或攻击内网系统。常用于端口扫描、访问内部服务、读取本地文件等。常见防御包括限制协议、域名和IP,但可通过302跳转、短地址等方式绕过。
502 1
web渗透-SSRF漏洞及discuz论坛网站测试
|
11月前
|
运维 数据可视化 C++
2025 热门的 Web 化容器部署工具对比:Portainer VS Websoft9
2025年热门Web化容器部署工具对比:Portainer与Websoft9。Portainer以轻量可视化管理见长,适合技术团队运维;Websoft9则提供一站式应用部署与容器管理,内置丰富开源模板,降低中小企业部署门槛。两者各有优势,助力企业提升容器化效率。
635 1
2025 热门的 Web 化容器部署工具对比:Portainer VS Websoft9
|
安全 JavaScript 前端开发
AppSpider 7.5.020 发布 - Web 应用程序安全测试
AppSpider 7.5.020 for Windows - Web 应用程序安全测试
246 0
|
10月前
|
安全 Linux iOS开发
Burp Suite Professional 2025.9 发布 - Web 应用安全、测试和扫描
Burp Suite Professional 2025.9 (macOS, Linux, Windows) - Web 应用安全、测试和扫描
681 0
Burp Suite Professional 2025.9 发布 - Web 应用安全、测试和扫描
|
12月前
|
安全 Linux iOS开发
Burp Suite Professional 2025.7 (macOS, Linux, Windows) - Web 应用安全、测试和扫描
Burp Suite Professional 2025.7 (macOS, Linux, Windows) - Web 应用安全、测试和扫描
822 0
Burp Suite Professional 2025.7 (macOS, Linux, Windows) - Web 应用安全、测试和扫描
|
XML 安全 前端开发
一行代码搞定禁用 web 开发者工具
在如今的互联网时代,网页源码的保护显得尤为重要,特别是前端代码,几乎就是明文展示,很容易造成源码泄露,黑客和恶意用户往往会利用浏览器的开发者工具来窃取网站的敏感信息。为了有效防止用户打开浏览器的 Web 开发者工具面板,今天推荐一个不错的 npm 库,可以帮助开发者更好地保护自己的网站源码,本文将介绍该库的功能和使用方法。 功能介绍 npm 库名称:disable-devtool,github 路径:/theajack/disable-devtool。从 f12 按钮,右键单击和浏览器菜单都可以禁用 Web 开发工具。 🚀 一行代码搞定禁用 web 开发者工具 该库有以下特性: • 支持可配
1506 22
|
11月前
|
前端开发 Java jenkins
Jmeter压力测试工具全面教程和使用技巧。
JMeter是一个能够模拟高并发请求以检查应用程序各方面性能的工具,包括但不限于前端页面、后端服务及数据库系统。熟练使用JMeter不仅能够帮助发现性能瓶颈,还能在软件开发早期就预测系统在面对真实用户压力时的表现,确保软件质量和用户体验。在上述介绍的基础上,建议读者结合官方文档和社区最佳实践,持续深入学习和应用。
2103 10