ab使用范例: 
要执行 1000 次的 connection, 20 次的 concurrent (并行, 同时):

语法: ab -n 1000 -c 20 http://localhost/index.php

ab 参数:

Usage: /usr/sbin/ab [options] [http[s]://]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 containg 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: zop'

§ 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

§ -s Use httpS instead of HTTP (SSL)

§ -h Display usage information (this message)

appache ab测试高并发的更多相关文章

  1. linux webbench测试高并发方法

    linux webbench测试高并发方法由于ab小工具 测试高并发 会出错 具体原因http://newmiracle.cn/?p=594所以采用webbench这个来测试<pre> w ...

  2. Thinkphp5 用ab压力测试工具测试高并发请求

    上篇文章[Thinkphp5实现悲观锁]已介绍过thinkphp5使用悲观锁实现高并发的场景,这篇文章将实际测试下. 在shell里进入到apache的bin目录,输入以下url: ab -n 100 ...

  3. ab测试大并发错误

    转载自http://xmarker.blog.163.com/blog/static/226484057201462263815783 apache 自带的ab工具测试,当并发量达到1000多的时候报 ...

  4. Java高并发测试框架JCStress

    前言 如果要研究高并发,一般会借助高并发工具来进行测试.JCStress(Java Concurrency Stress)它是OpenJDK中的一个高并发测试工具,它可以帮助我们研究在高并发场景下JV ...

  5. 利用Redis锁解决高并发问题

    这里我们主要利用Redis的setnx的命令来处理高并发. setnx 有两个参数.第一个参数表示键.第二个参数表示值.如果当前键不存在,那么会插入当前键,将第二个参数做为值.返回 1.如果当前键存在 ...

  6. 利用 Redis 锁解决高并发问题

    这里我们主要利用 Redis 的 setnx 的命令来处理高并发. setnx 有两个参数.第一个参数表示键.第二个参数表示值.如果当前键不存在,那么会插入当前键,将第二个参数做为值.返回 1.如果当 ...

  7. Linux下解决高并发socket最大连接数所受的各种限制(解除IO限制)

    linux作为服务器系统,当运行高并发TCP程序时,通常会出现连接建立到一定个数后不能再建立连接的情况 本人在工作时,测试高并发tcp程序(GPS服务器端程序),多次测试,发现每次连接建立到3800左 ...

  8. Linux下解决高并发socket最大连接数限制,tcp默认1024个连接

    linux作为服务器系统,当socket运行高并发TCP程序时,通常会出现连接建立到一定个数后不能再建立连接的情况 本人在工作时,测试高并发tcp程序(GPS服务器端程序),多次测试,发现每次连接建立 ...

  9. C#实现请求唯一性校验支持高并发

    使用场景描述: 网络请求中经常会遇到发送的请求,服务端响应是成功的,但是返回的时候出现网络故障,导致客户端无法接收到请求结果,那么客户端程序可能认为判断为网络故障,而重复发送同一个请求.当然如果接口中 ...

随机推荐

  1. idea maven 依赖还原不上的问题 method <init>()V not found

    问题 还原项目依赖的时候报错: java.lang.RuntimeException: org.codehaus.plexus.component.repository.exception.Compo ...

  2. unity---判断物体碰撞的对象

    脚本效果 trrn对象为地面,排除这个选项

  3. 136_Power BI 自定义矩阵热力图

    博客:www.jiaopengzi.com 焦棚子的文章目录 请点击下载附件 一.背景 在前几天在pbirs自定义登录后,发现一个问题就是非Power BI原生的视觉无法显示,改回AD登录又可以了.目 ...

  4. 以点类 Point 及平面图形类 Plane 为基础设计三角形类 Triangle

    学习内容:以点类 Point 及平面图形类 Plane 为基础设计三角形类 Triangle 代码示例: import java.util.Scanner; class Point{ private ...

  5. 关于『进击的Markdown』:第三弹

    关于『进击的Markdown』:第三弹 建议缩放90%食用 我与神明画押,赌这弹markdown又双叒叕拖稿了 %%%Markdown!我的CSDN编辑器崩了呜呜呜 各路英雄豪杰,大家好!  我们要开 ...

  6. UNION 与 UNION ALL 的区别

    UNION:合并查询结果,并去掉重复的行. UNION ALL:合并查询结果,保留重复的行. 举例验证说明: 创建两个表:user_info 和 user_info_b,设置联合主键约束,联合主键的列 ...

  7. SpringCloud 简介

    目录 什么是微服务? 初识 SpringCloud SpringCloud VS Dubbo 什么是微服务? <互联网系统架构演变> "微服务"一词源于 Martin ...

  8. web自动化之元素定位篇

    一.web自动化元素定位的方式有8种.------腾讯课堂 1.1 id定位: 1.2 class定位: 1.3 classname定位 1.4 tag_name 1.5

  9. linux服务器通过mailx邮件发送附件到指定邮箱

    shell脚本查询数据库#!/bin/bash HOSTNAME="数据库IP" PORT="端口" USERNAME="用户" PASSW ...

  10. bat-设置oracle服务

    1.停止oracle所有服务 并将服务设置为手动启动 @echo off echo oracle服务--------停止 net stop OracleVssWriterORCL net stop O ...