Centos 安装ab工具
来源:互联网 发布:软件直销网 编辑:程序博客网 时间:2024/05/20 11:24
ab运行需要apr-util和yum-utils依赖包,如果还没有安装,需要下载最新版本安装
一、检测依赖包是否安装
输入下面两个命令,检测依赖包是否安装
[root@localhost abtmp]# rpm -qa|grep apr-utilapr-util-1.5.2-6.el7.x86_64[root@localhost abtmp]# rpm -qa|grep yum-utilsyum-utils-1.1.31-40.el7.noarch
输入以上两个命令,如果没有出现下面信息,则表示没有安装
如果没有安装,请使用以下命令安装
[root@localhost abtmp]# yum -y install apr-util[root@localhost abtmp]# yum -y install yum-utils
二、安装ab工具
新建一个目录,下载解压用:
[root@localhost abtmp] cd /opt[root@localhost opt] mkdir abtmp[root@localhost opt] cd abtmp[root@localhost abtmp] yum install yum-utils.noarch[root@localhost abtmp] yumdownloader httpd-tools*[root@localhost abtmp] rpm2cpio httpd-tools*.rpm | cpio -idmv
将./user/bin/ab复制到系统bin下即可:
[root@localhost abtmp] cp /opt/abtmp/usr/bin/ab /usr/bin
三、测试
模拟100个并发,执行1000次请求,结果如下:
[root@localhost abtmp] ab -n 1000 -c 100 http://localhost/index.phpThis 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 localhost (be patient)Completed 100 requestsCompleted 200 requestsCompleted 300 requestsCompleted 400 requestsCompleted 500 requestsCompleted 600 requestsCompleted 700 requestsCompleted 800 requestsCompleted 900 requestsCompleted 1000 requestsFinished 1000 requestsServer Software: nginx/1.9.9Server Hostname: localhostServer Port: 80Document Path: /index.phpDocument Length: 92249 bytesConcurrency Level: 100Time taken for tests: 4.545 secondsComplete requests: 1000Failed requests: 100 (Connect: 0, Receive: 0, Length: 100, Exceptions: 0)Write errors: 0Total transferred: 92409886 bytesHTML transferred: 92248886 bytesRequests per second: 220.02 [#/sec] (mean)Time per request: 454.505 [ms] (mean)Time per request: 4.545 [ms] (mean, across all concurrent requests)Transfer rate: 19855.44 [Kbytes/sec] receivedConnection Times (ms) min mean[+/-sd] median maxConnect: 0 1 6.3 0 139Processing: 12 435 92.7 468 573Waiting: 5 435 92.6 468 572Total: 12 436 91.8 468 573Percentage of the requests served within a certain time (ms) 50% 468 66% 478 75% 489 80% 494 90% 502 95% 507 98% 521 99% 531 100% 573 (longest request)
阅读全文
0 0
- Centos 安装ab工具
- centos ab压力测试工具安装
- 压力测试工具ab 及 centos下单独安装方法
- 压力测试工具ab 及 centos下单独安装方法
- Centos Web 压力测试工具ApacheBench (ab)独立安装
- ab 工具安装
- Apache ab测试工具安装
- linux安装ab测试工具
- linux centos 单独安装ab,及ab性能指标
- 在centos下单独安装ab命令
- centos apache 安装ab测试命令
- centos单独编译安装ab测试
- Linux下 安装ab测试工具
- (9) ab测试工具安装与使用
- Linux Nginx Centos 下使用 ab 工具 进行压力测试
- CentOS压力测试 ab 命令安装与使用
- 在centos下单独安装Apache ab命令
- centos 安装 webmin工具
- 22 More Libraries
- JavaScript数据类型
- 1. Locust的hack之路- 压测脚本的传输及自启动slaves
- 说说 Java I/O 系统——如何执行操作系统的命令
- 23 Dialects of Racket and Scheme
- Centos 安装ab工具
- Android实现获取本机中所有图片
- Android获取debug和正式的SHA1值
- hdu-1241-Oil Deposits(dfs水)
- 24 Command-Line Tools and Your Editor of Choice
- Ubuntu14+OpenCV3.1+Caffe 虚拟机安装笔记(四)虚拟机下载
- FragmentPagerAdapter API
- Android 4.0
- 电阻的分类