服务器技术

 首页 > 服务器技术 > apache > 使用ApacheBench进行网站性能测试|to-Apache教程

使用ApacheBench进行网站性能测试|to-Apache教程

分享到:
【字体:
导读:
          ...

apacheBench 主要是用来测试阿帕奇服务器执行效率用的。安装好apache服务器套件后,进入bin目录,就可以找到该可执行文件ab.exe。

         ApacheBench可以针对某一特定URL模拟出连续的联机请求,同时还可以仿真出同时间点个数相同的联机请求,因而利用 ApacheBench 可帮助我们在网站开发期间仿真实际上线可能的情况,利用仿真出来的数据做为调整服务器设定或程序的依据。

ab用法如下

Usage: ab [options] [http[s]://]hostname[:port]/path
Options are:
    -n requests     Number of requests to perform #请求次数
    -c concurrency  Number of multiple requests to make #同一时间发出多少个请求(并行连接)
    -t timelimit    Seconds to max. wait for responses
    -p postfile     File containing data to POST
    -T content-type Content-type header for POSTing
    -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
    -s              Use httphotoshop/ target=_blank class=infotextkey>ps instead of HTTP (SSL)
    -h              Display usage information (this message)

《使用ApacheBench进行网站性能测试》由第二电脑网原创提供,转载请注明:http://www.002pc.com/master/College/Server/Apache/17837.html
分享到:
10分钟搭建http负载均衡集群|192.168.10....
网络拓扑图 整个系统为fedora core2,系统默认已经把ipvs编译为内核模块,我们用的时候就加载内核模块就可以了。 now 开始 对于director: #yum install ipvsadm #modprobe ip_vs #vi /etc/sysctl.conf 加入: net.ipv4.conf.all.send_red...
Apach与Tomcat集群安装配置|安装-Apache...
1   环境说明 1.  服务器有4台,一台内核的linux2.6.9安装apache,三台安装Tomcat。 2.  apache2.2.4、apache-tomcat-5.5.17、jdk-6u1-linux-i586-rpm.bin或者jdk1.5.6 ip配置,一台安装apache的ip为180.200.1.189,三台安装tomcat的服务器ip分别为180.200.1.111/136/42。当然需要修改成你自己的IP地址。 3.    下载地...
  •         php迷,一个php技术的分享社区,专属您自己的技术摘抄本、收藏夹。
  • 在这里……