2019独角兽企业重金招聘Python工程师标准>>>

ab的原理:ab命令会创建多个并发访问线程,模拟多个访问者同时对摸一个URL地址进行访问。它的测试目标是基于URL的,因此它既可以用来测试apache的负载压力,也可以测试nginx、lighthttp、tomcat、IIS等其他web服务器的压力。

$ ab -n1000 -c10 http://localhost:3000/

1000条请求,10个并发

相关参数:

-n requests     Number of requests to perform
-c concurrency  Number of multiple requests to make at a time
-t timelimit    Seconds to max. to spend on benchmarkingThis implies -n 50000
-s timeout      Seconds to max. wait for each responseDefault is 30 seconds
-b windowsize   Size of TCP send/receive buffer, in bytes
-B address      Address to bind to when making outgoing connections
-p postfile     File containing data to POST. Remember also to set -T
-u putfile      File containing data to PUT. Remember also to set -T
-T content-type Content-type header to use for POST/PUT data, eg.'application/x-www-form-urlencoded'Default is 'text/plain'
-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 attributesare a colon separated username and password.
-P attribute    Add Basic Proxy Authentication, the attributesare 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.
-q              Do not show progress when doing more than 150 requests
-l              Accept variable document length (use this for dynamic pages)
-g filename     Output collected data to gnuplot format file.
-e filename     Output CSV file with percentages served
-r              Don't exit on socket receive errors.
-m method       Method name
-h              Display usage information (this message)
-Z ciphersuite  Specify SSL/TLS cipher suite (See openssl ciphers)
-f protocol     Specify SSL/TLS protocol

转载于:https://my.oschina.net/iNiL0119/blog/680222

apache ab压力测试相关推荐

  1. apache ab压力测试报错apr_socket_recv

    apache ab压力测试报错(apr_socket_recv: Connection reset by peer (104)) apache 自带的ab工具测试,当并发量达到1000多的时候报错如下 ...

  2. Apache AB 压力测试

    2019独角兽企业重金招聘Python工程师标准>>> Apache AB 压力测试  安装 // 安装工具 yum install httpd-tools 使用 // URL 是网 ...

  3. Apache ab压力测试工具

    查看apache是否安装 # rpm -qa httpd httpd-2.2.3-63.el5.centos (在apache 版本2以后,apache全部改名为httpd) ab压力测试工具是apa ...

  4. Apache ab压力测试说明

    转自: http://leepiao.blog.163.com/blog/static/485031302010234352282/ 压力测试是一种基本的质量保证行为,它是每个重要软件测试工 作的一部 ...

  5. apache ab压力测试工具-批量压测脚本

    概述 ab(Apache benchmark)是一款常用的压力测试工具.简单易用,ab的命令行一次只能支持一次测试.如果想要批量执行不同的测试方式,并自动对指标进行分析,那么单靠手工一条一条命令运行a ...

  6. apache ab压力测试学习

    转载自  https://segmentfault.com/a/1190000012765485 1.介绍 网站性能压力测试是服务器网站性能调优过程中必不可缺少的一环.只有让服务器处在高压情况下,才能 ...

  7. 【Apache】Apache ab压力测试工具Window下载和用法详解

    ab是apache自带的网站压力测试工具.  使用起来非常的简单和方便.  不仅仅是可以apache服务器进行网站访问压力测试,还可以对其他类型的服务器进行压力测试.  比如nginx,tomcat, ...

  8. Apache ab 压力测试工具

    Apache Bin目录下的 ab.exe(ApacheBench) 程序是专门用在做压力测试用的软件. ApacheBench(ab) 用来测试 apache 执行效率,专门用来执行网站服务器的运行 ...

  9. apache ab压力测试报错

    今天用apache 自带的ab工具测试,当并发量达到1000多的时候报错如下: [root@aa~]# This is ApacheBench, Version 2.3 <Revision:65 ...

最新文章

  1. js里的匿名函数 数组排序
  2. 创建maven项目但是总是报错
  3. RxJava+Retrofit+OkHttp深入浅出-终极封装四(多文件下载之断点续传)
  4. 开放下载 | 《Knative 云原生应用开发指南》开启云原生时代 Serverless 之门
  5. 计算机程序中断方式有几种,奥鹏离线作业计算机组成原理一、简答题1、请说明程序查询方式与中断方式各自的特点.2、提高存储器速度可采用哪些措施,请说出...
  6. Netlink实现热拔插监控
  7. Java IO 系统
  8. 各种与视频编解码以及视频图像处理的应用相关的新技术,新方法,各种软件开发相关的算法,思想。...
  9. MongoDB,还有一个角度看数据
  10. Linux和Windows文件实时同步
  11. linux环境下cmake安装及使用
  12. linux下终端快捷键
  13. web前端入坑第二篇:web前端到底怎么学?干货资料!
  14. wake on LAN: 三分钟实现从Linux和Windows设备上远程唤醒设备
  15. [Alg]排序算法之插入排序
  16. 利用WMI轻松打造WINDOWS任务管理器
  17. HPE MSA存储的高性能连接解决方案
  18. 嫦.娥,名人,原生态的Blog
  19. IP协议号大全(转载)
  20. Oracle compound trigger的大坑(Oracle-12c)

热门文章

  1. Away3d 骨骼动画优化
  2. jquery文件上传控件 Uploadify
  3. 网页素材大宝库:50套非常精美的图标素材
  4. 闭关纪要17.Google app engine的简单应用
  5. Java数据访问对象模式
  6. JS 总结之事件循环
  7. 洛谷P1074 靶形数独(跳舞链)
  8. 1057. Stack (30)
  9. Android中修改弹出dialog背景无色透明,弹出时有遮罩
  10. 在 ASP.NET 网页中不经过回发而实现客户端回调