一、Apache上的设置

打开<Apache Installation>/conf/httpd.conf,进行如下修改:

1、  设置允许查看Apache运行状态的主机

#

# Allow server status reports, with the URL of http://servername/server-status

# Change the ".your-domain.com" to match your domain to enable.

#

#取消一下代码前面的注释符号“#”,并且设置Order(顺序)为允许优先

<Location /server-status>

SetHandler                                  server-status

Order                                        allow,deny

Deny from                                 nothing

Allow from                                all

</Location>

这样改变以后重新启动Apache在浏览器中输入http://servername/server-status就可以看到Apache运行时的信息,而输入http://servername/server-status?auto就会看到如下信息:

Total Accesses: 124

Total kBytes: 444

CPULoad: 3.32432

Uptime: 37

ReqPerSec: 3.35135

BytesPerSec: 12288

BytesPerReq: 3666.58

BusyWorkers: 1

IdleWorkers: 7

Scoreboard: ____W___.........................

看到这样的信息就表示修改成功,这样就可以使用LoadRunner监视Apache了。

以下两步跟使用LoadRunner监视Apache无关,可以跳过不看。

2、  改变Apache的设置,打开详细状态开关;

#

# ExtendedStatus controls whether Apache will generate "full" status

# information (ExtendedStatus On) or just basic information (ExtendedStatus

# Off) when the "server-status" handler is called. The default is Off.

#

#取消了下面一行前面的注释符号“#”

ExtendedStatus On

3、  有用的设置,查看各模块信息

#

# Allow remote server configuration reports, with the URL of

#  http://servername/server-info (requires that mod_info.c be loaded).

# Change the ".example.com" to match your domain to enable.

#

#取消一下代码前面的注释符号“#”,并且设置Order(顺序)为允许优先

<Location /server-info>

SetHandler                                  server-info

Order                                         allow,deny

Deny from                                  nothing

Allow from                                 all

</Location>

二、LoadRunner上的设置

经过以上第一项设置以后就可以使用LoadRunner监控Apache的运行情况了,在LoadRunner可用的监视器中双击Web Server Resource Graphs下的Apache节点,然后在右边对应的窗口中添加Apache所在主机的IP地址,并且加入计数器后单击OK,这样就可以在LoadRunner中实时显示Apache的运行状态信息了。

注意:您可能收到如下消息【Monitor name :Apache. Parsing error, cannot find token: BusyServers. Measurement: BusyServers|192.168.0.186. Hints: 1) Such a measurement does not exist, or the html page may be different from the supported one. 2) Try to replace the Apache.cfg with appropriate Apache_<version>.cfg file in <Installation>/dat/monitors and rerun the application (entry point: CApacheMeasurement::NewData).   [MsgId: MMSG-47479]】,这是由于要监视Apache的版本提供的计数器与LoadRunner默认的计数器不一致导致的。此时建议先关闭Controller,打开<Installation>/dat/monitors下的apache.cfg文件(其它文件名类似Apache_<version>.cfg的是Apache监视配置的备份,只有apache.cfg是生效的):

1、  修改Counter0=IdleServers为Counter0=IdleWorkers,同时修改注释信息Label0=#Idle Servers (Apache)为Label0=#Idle Workers (Apache),描述信息也建议修改;

2、  修改Counter4=BusyServers为Counter4=BusyWorkers,同时修改注释信息Label4=#Busy Servers (Apache)为Label4=#Busy Workers (Apache) ,描述信息也建议修改。

然后保存并关闭该文件,重新打开Controller并添加计数器,这样监视就正常了。

使用LoadRunner监控Apache的步骤 (转)的更多相关文章

  1. loadrunner监控apache服务

    一.apache配置步骤(假设apache服务已安装) 1.使用find / -name httpd.conf命令查找httpd.conf文件 2.使用cd opt/lampp/apache2/con ...

  2. Loadrunner监控Apache

    一.安装Apache yum -y install httpd 二.配置Apache 1.设置开机启动 chkconfig httpd on 2.开启Apache service httpd star ...

  3. LoadRunner 监控 Apache

    配置Apache部分 1.修改Apache中Httpd.conf文件 <Location /server-status> SetHandler server-status Order de ...

  4. 使用LoadRunner监控Apache

    前提本文使用的是lampp环境下自带的Apache服务 一.查看文件 查看文件确保目录中有Apache,我在这里使用的是用xampp自带apache [root@besttest ~]# ll 二.配 ...

  5. LR监控Apache资源

    前提本文使用的是lampp环境下自带的Apache服务 步骤1.修改Apache中Httpd.conf文件,添加如下代码:文件位置为:/opt/lampp/etc/httpd.conf,如下图: &l ...

  6. LoadRunner监控Linux

    rstat协议允许网络上的用户获得同一网络上各机器的性能参数. 需要下载3个包:    (1)rsh-0.17-14.i386.rpm     (2)rsh-server-0.17-14.i386.r ...

  7. LoadRunner监控Unix、Windows方法及常用性能指标

    目  录 一.LoadRunner监控Linux资源.... 3 (一).准备工作... 3 1.可以通过两种方法验证服务器上是否配置了rstatd守护程序:... 3 (2)使用find命令... ...

  8. LoadRunner监控Linux资源

    一.LoadRunner监控Linux资源 (一).准备工作 首先,监视Linux一定要有rstatd这个守护进程,有的Linux版本里也有可能是rpc.rstatd这里只是名字不同而已,功能是一样的 ...

  9. 应用LR监控Apache性能

    1)对Apache服务器中的http.conf进行如下配置修改Apache中Httpd.conf文件,添加如下代码(该文件中都有,只要取消注释就好了)<Location /server-stat ...

随机推荐

  1. Remove @Override annotation错误提示

    因为对于JDK5.0/1.5版本来说,@Override annotation只能用与对超类的方法重写上, 而不能用在对接口方法的实现方法上. 解决的方法是把JDK改为1.6的或动手把注释@Overr ...

  2. secureCRT的自动登录设置

    具体设置的步骤如下: 1. 打scrt,创建一个新的回话 2. 右击该回话选择属性,定位到左边选项卡的登录动作 3. 第一行:预期是$; 发送是ssh username@machine name 第二 ...

  3. bash特性

    (1)shell简介 shell是系统的用户界面,提供用户与内核进行交互操作的一种接口,它接收用户输入的命令并把它送入内核去执行.实际上shell是一个命令解释器 (2)shell语法 语法:命令 选 ...

  4. Spring:基于注解的依赖注入的使用

    1.什么是pojo?什么是bean? 首先,在之前几篇Spring的介绍文章当中,自己都提到了一个名词叫做POJO类,但是在回顾Spring的注解的使用的时候,去形容java当中的对象还有一个名词是叫 ...

  5. 百度之星资格赛 2016 Problem 1001

    本文链接http://www.cnblogs.com/Ash-ly/p/5494618.html 题意: 度熊手上有一本字典存储了大量的单词,有一次,他把所有单词组成了一个很长很长的字符串.现在麻烦来 ...

  6. UVALive - 3211 (2-SAT + 二分)

    layout: post title: 训练指南 UVALive - 3211 (2-SAT + 二分) author: "luowentaoaa" catalog: true m ...

  7. hdu6156

    hdu6156 题意 求 \([2, 36]\) 进制下,给定区间内的数是回文数的个数.每存在一个回文数,答案加上该回文数的进制. 分析 10进制下回文数是 数位DP 很常见的问题,这道题只需要把在转 ...

  8. Codeforces 1036E. Covered Points

    又一次写起了几何.... 特殊处理在于有可能出现多条线段交于一点的情况,每次考虑时,对每条线段与其他所有线段的交点存在一个set里,对每一个set,每次删除set.size()即可 重点在于判断两条线 ...

  9. 服务认证暴力破解工具Crowbar

    服务认证暴力破解工具Crowbar   Crowbar是Kali Linux新增的一款服务认证暴力破解工具.该工具支持OpenVPN.RDP.SSH和VNC服务.该工具具备常见的暴力破解功能,如主机字 ...

  10. HDOJ 4961 Boring Sum

    Discription Number theory is interesting, while this problem is boring. Here is the problem. Given a ...