ubuntu,centor 安装apache bench

Posted 盘思动

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ubuntu,centor 安装apache bench相关的知识,希望对你有一定的参考价值。

ab全称为:apache bench。

是apache自带的压力测试工具。ab非常实用,它不仅可以对apache服务器进行网站访问压力测试,也可以对或其它类型的服务器进行压力测试。比如nginx、tomcat、IIS等。

 

    ubuntu 安装:

    sudo apt-get install apache2-utils



centos 安装:
yum install apr-util

# 安装依赖 yum-utils中的yumdownload 工具
# 如果没有找到 yumdownload 命令可以
yum install yum-utils



[email protected]:/$ ab -n 1000 -c 100 http://local.wo.com/api.com/Index/getBanner
This is ApacheBench, Version 2.3 <$Revision: 1528965 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/

Benchmarking local.wo.com (be patient)
Completed 100 requests
Completed 200 requests
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:        local.wo.com
Server Port:            80

Document Path:          /api.com/Index/getBanner
Document Length:        162 bytes

Concurrency Level:      100
Time taken for tests:   0.074 seconds
Complete requests:      1000
Failed requests:        0
Non-2xx responses:      1000
Total transferred:      305000 bytes
html transferred:       162000 bytes
Requests per second:    13576.44 [#/sec] (mean)
Time per request:       7.366 [ms] (mean)
Time per request:       0.074 [ms] (mean, across all concurrent requests)
Transfer rate:          4043.76 [Kbytes/sec] received

Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        1    3   0.6      3       5
Processing:     1    4   1.1      4       8
Waiting:        1    3   1.1      3       8
Total:          4    7   0.8      7      10

Percentage of the requests served within a certain time (ms)
  50%      7
  66%      7
  75%      7
  80%      7
  90%      8
  95%      8
  98%      9
  99%     10
 100%     10 (longest request)

  




以上是关于ubuntu,centor 安装apache bench的主要内容,如果未能解决你的问题,请参考以下文章

centor6.4 系统怎么配置环境

ubuntu18.04 用dkms安装wifi驱动rtl8723be

ubuntu16.04 无线网卡rtl8723be安装

Ubuntu无法安装rpm包,ubuntu RPM should not be used directly install RPM packages, use Alien instead!

Ubuntu下yaml-cpp的安装

c_cpp 打包/打开LE / BE