ubuntu中安装apache ab命令进行简单压力测试
1.安装ab命令
2.ab命令参数说明.
Options are:
//总的请求数
-n requests Number of requests to perform宅
//一次同时并发的请求数 总的请求数(n)=次数*一次并发数(c)
-c concurrency Number of multiple requests to make
-t timelimit Seconds to max. wait for responses
-b windowsize Size of TCP send/receive buffer, in bytes
-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 for POSTing, 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 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
-r Don't exit on socket receive errors.
-h Display usage information (this message)
-Z ciphersuite Specify SSL/TLS cipher suite (See openssl ciphers)
-f protocol Specify SSL/TLS protocol (SSL2, SSL3, TLS1, or ALL)
3.运行 ab -n 100 -c 10 http://hikin.iteye.com/
下面是对http://hikin.iteye.com/ 进行着100次请求,10个请求同时并发 压力测试结果
Server Hostname: hikin.iteye.com
Server Port: 80
Document Path: /
Document Length: 2095 bytes
Concurrency Level: 10
//整个测试持续的时间
Time taken for tests: 3.303 seconds
//完成的请求数量
Complete requests: 100
Failed requests: 0
Write errors: 0
Total transferred: 235200 bytes
HTML transferred: 209500 bytes
//平均每秒处理30个请求
Requests per second: 30.27 [#/sec] (mean)
//平均每个请求处理时间为330毫秒 注:这里将一次10个并发请求看成一个整体
Time per request: 330.335 [ms] (mean)
//平均每个并发请求处理 时间 为33毫秒
Time per request: 33.034 [ms] (mean, across all concurrent requests)
Transfer rate: 69.53 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 51 170 35.9 178 230
Processing: 60 153 64.5 121 263
Waiting: 55 148 64.4 115 258
Total: 235 322 59.9 299 437
Percentage of the requests served within a certain time (ms)
//在这100个请求中有50%在299毫秒内完成
50% 299
//在这100个请求中有66%在312毫秒内完成
66% 312
75% 383
80% 412
90% 431
95% 432
98% 436
99% 437
100% 437 (longest request)
ubuntu中安装apache ab命令进行简单压力测试的更多相关文章
- Webbench、ab命令:做压力测试的工具和性能的监控工具
DDOS攻击:???DDOS概述:分布式拒绝服务(DDoS:Distributed Denial of Service)攻击,指借助于客户/服务器技术,将多个计算机联合起来作为攻击平台,对一个或多个目 ...
- 如何使用 Apache ab 以及 OneAPM 进行压力测试?
下一个 release 准备小长假后就要 go-live ,所有的测试 case 都 cover 过了,但还未进行过压力测试,有点不放心,刚好过节期间家人都回家去了,假期终于可以抽点时间压测一把. A ...
- 【开发者笔记】利用ab命令对接口进行压力测试
目标:对接口进行正确性测试和压力测试 工具:Apache-ab 下载 系统:Windows.linux 目标接口:http://www.stagebo.xyz/foru/lifemonths 命令:a ...
- Docker Ubuntu中安装ping ifconfig命令
Ubuntu 容器环境安装ping ifconfig 进入容器执行:ifconfig ping 没有该命令 apt-get update ###命令 ifconfig apt-get install ...
- 记录在Ubuntu 18.04系统中安装Apache, MySQL和PHP环境
虽然我们在Linux VPS.服务器安装WEB环境比较方便,可以选择面板或者一键包,但是有些我们需要深入学习的网友不会选择一键安装,而是会尝试编译安装.这样可以学到一些内在的技术.一般我们较为习惯选择 ...
- Ubuntu中安装配置 JDK与apache
一,前期准备: 1.下载apach网址:https://tomcat.apache.org/download-90.cgi 3.下载:jdk网址:http://www.oracle.com/techn ...
- 【转】在Ubuntu中安装HBase
原博客出自于: http://blog.fens.me/category/%E6%95%B0%E6%8D%AE%E5%BA%93/ 感谢! Posted: Apr 3, 2014 Tags: Hado ...
- 在Ubuntu中安装Redis
原文地址:http://blog.fens.me/linux-redis-install/ 在Ubuntu中安装Redis R利剑NoSQL系列文章,主要介绍通过R语言连接使用nosql数据库.涉及的 ...
- 如何在ubuntu中安装php
如何在ubuntu中安装php 情衅 | 浏览 692 次 发布于2016-05-07 12:36 最佳答案 关于Ubuntu下的LAMP配置步骤: 首先要安装LAMP 就是Apache,PH ...
随机推荐
- Python的异步编程[0] -> 协程[1] -> 使用协程建立自己的异步非阻塞模型
使用协程建立自己的异步非阻塞模型 接下来例子中,将使用纯粹的Python编码搭建一个异步模型,相当于自己构建的一个asyncio模块,这也许能对asyncio模块底层实现的理解有更大的帮助.主要参考为 ...
- 51nod 1129 字符串最大值
首先我们可以想到的是,既然求的是前缀的长度,就意味着一定是从1开始的,那么我们可以直接用下 标表示每一个前缀.但是可能存在几个前缀互相包含的情况,比如:abababa我们可以看见的是aba中包含着ab ...
- PL SQL 基础
Oracle之PL/SQL学习笔记 自己在学习Oracle是做的笔记及实验代码记录,内容挺全的,也挺详细,发篇博文分享给需要的朋友,共有1w多字的学习笔记吧.是以前做的,一直在压箱底,今天拿出来整 ...
- HDOJ 4085 Peach Blossom Spring
discriptionTao Yuanming(365-427) was a Chinese poet of Eastern Jin dynasty. One of his most famous w ...
- 【模拟】bzoj2295 【POJ Challenge】我爱你啊
#include<cstdio> #include<cstring> using namespace std; int n; char s[100001],table[]=&q ...
- 【周期性/容斥+二分】POJ2773-HAPPY 2006
[题目大意] 求与n互质的第k个数. [思路] 先求出小于k且与n互质的数,再利用gcd(bt+a,b)=gcd(a,b)的性质求解,效率低.枚举与n互质的数的效率是O(nlogn),求解第k个数的效 ...
- Mysql-库的基本操作
一 .系统数据库 二 .创建数据库 三 .数据库相关操作 一. 系统数据库 information_schema: 虚拟库,不占用磁盘空间,存储的是数据库启动后的一些参数,如用户表信息.列信息.权限信 ...
- 指定等级 Exercise07_01
import java.util.Scanner; /** * @author 冰樱梦 * 时间:2018年下半年 * 题目:指定等级 * */ public class Exercise07_01 ...
- 连接sqlexpress
sqlexpress在visualstudio安装时可选择安装. 数据源添加 localhost\sqlexpress window身份认证即可.
- CSS3:box-sizing 怪异盒模型
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...