Linux ab 命令
ab 是一个性能测试工具,用来测试一个页面每秒钟能处理多少HTTP请求
[root@localhost ~]$ yum install -y httpd-tools # 安装ab工具
[root@localhost ~]$ ab -c 10 -n 1000 http://www.91cnm.com/ # 指定并发请求数为10,总请求数为1000,对http://www.91.cnm.com/进行压力测试
This is ApacheBench, Version 2.3 <$Revision: 1430300 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking www.91cnm.com (be patient)
Completed 100 requests # 已经完成了100个请求
Completed 200 requests # 已经完成了200个请求
Completed 300 requests
Completed 400 requests # 这个地方是关注点之一,如果全部完成了,说明服务器能扛住我们所指定的请求量
Completed 500 requests # 我们可以继续增大请求数来进行测试,直到扛不住了就是最大的所能处理的请求了
Completed 600 requests
Completed 700 requests
Completed 800 requests
Completed 900 requests
Completed 1000 requests
Finished 1000 requests Server Software: nginx # 所请求的服务端软件
Server Hostname: www.91cnm.com # 所请求的服务端主机名
Server Port: 80 # 所请求的服务端端口 Document Path: / # 请求的URL资源
Document Length: 10507 bytes # 请求的页面大小 Concurrency Level: 10 # 并发请求数,也就是我们用 -c 10 指定的数量
Time taken for tests: 43.339 seconds # 总访问时间,也就是服务器处理完这些请求所花费的时间
Complete requests: 1000 # 请求成功的数量
Failed requests: 0 # 请求失败的数量,这个地方也是关注点之一,如果出现有失败的,说明有点扛不住了
Write errors: 0 # 网络连接写入错误数
Total transferred: 10645000 bytes # 请求的总数据大小(包括header头信息)
HTML transferred: 10507000 bytes # 请求的HTML文档的总数据大小
Requests per second: 23.07 [#/sec] (mean) # 平均每秒请求数,是总请求数除以处理完成这些请求数所花费的时间的结果,也是重要指标之一
Time per request: 433.387 [ms] (mean) # 表示用户平均请求等待时间,参考:https://www.imooc.com/article/19952
Time per request: 43.339 [ms] (mean, across all concurrent requests) # 表示服务器平均请求处理时间,参考:https://www.imooc.com/article/19952
Transfer rate: 239.87 [Kbytes/sec] received # 平均每秒传输多少K,也就是服务器的带宽了 Connection Times (ms)
min mean[+/-sd] median max
Connect: 150 164 32.4 168 1163
Processing: 150 265 307.8 168 2726
Waiting: 150 264 307.9 168 2726
Total: 300 429 311.4 336 2895 Percentage of the requests served within a certain time (ms)
50% 336 # 50%的请求数在336ms内返回
66% 338 # 66%的请求数在338ms内返回
75% 340
80% 341 # 这个地方也是关注点之一,我们不仅要扛住这么多请求,而且要尽快地处理请求并响应回客户端
90% 697
95% 1073
98% 1766
99% 1843
100% 2895 (longest request)
Linux ab 命令的更多相关文章
- Linux查找命令:grep,awk,sed
		
grep grep (global search regular expression(RE) and print out the line,全面搜索正则表达式并把行打印出来)是一种强大的文本搜索工具 ...
 - linux全部命令
		
linux全部命令 一.安装和登陆命令1.进入图形界面startx 2.进入图形界面init 5 3.进入字符界面init 3 4.登陆login 5.关机poweroff-p 关闭机器的时候关闭电源 ...
 - linux grep命令总结
		
风生水起善战者,求之于势,不责于人,故能择人而任势. 博客园 首页 新随笔 联系 订阅 管理 posts - 791, comments - 394, trackba ...
 - linux常用命令加实例大全
		
目 录引言 1一.安装和登录 2(一) login 2(二) shutdown 2(三) halt 3(四) reboot 3(五) ...
 - Linux常用命令2--用户问题、文件的打包压缩
		
Linux常用命令 如何进行用户和群组的创建和更改 [1]groupadd:用于创建新的群组. 语法:groupadd [-option] 用户名:其常用参数有:-g groupadd -g 555 ...
 - linux + shell 命令等
		
Linux命令[注意:建议用UltraEdit打开] 一.文件处理命令 1.命令格式与目录处理命令 ls –a[查看隐藏文件] ls –l[查看文件信息长格式显示] ls –d[查看指定目录的详细信息 ...
 - linux常用命令【原创】
		
查看文件内容-while: cat 1.txt|while read line;do echo $line;done while read line; do echo $line; done < ...
 - linux常用命令 grep命令
		
linux grep命令 Linux系统中grep命令是一种强大的文本搜索工具,它能使用正则表达式搜索文本,并把匹配行打印出来 grep 全称 Grobal Regular Expression Pr ...
 - Linux printf命令详解
		
Linux printf命令 printf命令模仿了C语言中的printf()函数.主要作用是输出文本,按照我们指定的格式输出文本.还有一个输出文本的命令echo,在输出文本时,echo会换行.pri ...
 
随机推荐
- j解决sparkr中使用某些r的原生函数 发生错误Error: class(objId) == "jobj" is not TRUE的问题
			
Create table function in Spark in R not working João_Andre (3) 询问的问题 | 2016年12月10日 06:03BLUEMIXRSPA ...
 - Enums and Lookup Tables with EF Code First
			
With EntityFramework’s support for enums, there is no longer any need to include lookup tables in th ...
 - 浅谈C++中对象的复制与对象之间的相互赋值
			
C++对象的复制 有时需要用到多个完全相同的对象,例如,同一型号的每一个产品从外表到内部属性都是一样的,如果要对每一个产品分别进行处理,就需要建立多个同样的对象,并要进行相同的初始化,用以前的办法定义 ...
 - iOS 基础入门--Bull' Eye 小游戏 
			
  说明   Bull's Eye小游戏是http://www.raywenderlich.com/store/ios-apprentice里非常酷的入门demo 跟着该教程一步步做下来便有了 ...
 - SpagoBI 教程 Lesson 5: Creating a dashboard with BIRT and SpagoBI
			
SpagoBI Lesson 5: Creating a dashboard with BIRT and SpagoBI Creating a dashboard with BIRT and Spag ...
 - memcache -- 使用场景
			
memcache:分布式缓存机制 使用场景: 1.对数据的存储要求不高,就算丢失也关系不大(因为memcache是非持久化存储) 2.不适合单机使用,即不适合将memcache和数据库等都放到同一台机 ...
 - Java获取正在执行的函数名
			
利用StackTrace堆栈轨迹获取某个时间的调用堆栈状态. package com.dsp.demo; public class TechDemo { public static void main ...
 - R语言ggplot2中的panel. strip 基本概念
			
ggplot2 是一套独立的绘图系统,在一个完整的ggplot2的图表中,会有下面几个概念: 1) plot 2) panel 3) strip 4) legend 所有这些元素都会出现在图表中 代码 ...
 - win10 禁用Defender
			
cmd reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows Defender" /v "Dis ...
 - ios Develop mark
			
App Distribution Guidehttps://developer.apple.com/library/ios/documaentation/IDEs/Conceptual/AppDist ...