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 ...
随机推荐
- Web CI过程中的Security解决方案
http://www.infoq.com/cn/articles/WebScan-CI 一. 当前Web应用安全现状 随着中国互联网金融的爆发和繁荣,Web应用在其中扮演的地位也越来越重要,比如Web ...
- 细菌(disease) (位运算)(状态压缩)
细菌(disease) 时间限制: 1 Sec 内存限制: 64 MB提交: 9 解决: 5[提交][状态][讨论版] 题目描述 近期,农场出现了D(1≤D≤15)种细菌.John要从他的N(1≤ ...
- [HNOI2018]道路(DP)
题目描述 W 国的交通呈一棵树的形状.W 国一共有n−1n - 1n−1 个城市和nnn 个乡村,其中城市从111 到n−1n - 1n−1 编号,乡村从111 到nnn 编号,且111 号城市是首都 ...
- POJ 3250 Bad Hair Day(单调栈)
[题目链接] http://poj.org/problem?id=3250 [题目大意] 有n头牛,每头牛都有一定的高度,他能看到在离他最近的比他高的牛前面的所有牛 现在每头牛往右看,问每头牛能看到的 ...
- 每天一个linux命令12之top
top命令是Linux下常用的性能分析工具,能够实时显示系统中各个进程的资源占用状况,类似于Windows的任务管理器.下面详细介绍它的使用方法.top是一个动态显示过程,即可以通过用户按键来不断刷新 ...
- 命令行下的C++程序转换成VC的MFC程序需要注意的问题
在将命令行下的C++程序转换成MFC窗口程序时一般会提示下面这种错误: fatal error C1010: unexpected end of file while looking for prec ...
- iOS开发 Swift开发数独游戏(五)显示游戏答案
要点是设置好Tag就好,通过代码找到并初始化即可. 1: // 2: // ShowAnswerController.swift 3: // sudoku-v02 4: // 5: // ...
- SpringBoot定时任务(Spring Schedule )实现方法
FastDateFormat fdf = FastDateFormat.getInstance("yyyy-MM-dd HH:mm:ss"); fdf.format(new Dat ...
- mormot数据库连接+查询+序列为JSON
mormot数据库连接+查询+序列为JSON uses SynDB,SynCommons, SynDBRemote, SynOleDB, SynDBMidasVCL, mORMotMidasVCL p ...
- 【FTP】java FTPClient 文件上传内容为空,文件大小为0
问题:如题所述,使用FTPClient上传至FTP服务器, 表现如下:①文件大小为0 ②上传很小的文件,但是要花费很长的时间,20K要花费2分钟甚至更久 ③没有任何的报错,没有任何的乱码 解决方法: ...