使用LoadRunner监控Apache的步骤 (转)
一、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的步骤 (转)的更多相关文章
- loadrunner监控apache服务
一.apache配置步骤(假设apache服务已安装) 1.使用find / -name httpd.conf命令查找httpd.conf文件 2.使用cd opt/lampp/apache2/con ...
- Loadrunner监控Apache
一.安装Apache yum -y install httpd 二.配置Apache 1.设置开机启动 chkconfig httpd on 2.开启Apache service httpd star ...
- LoadRunner 监控 Apache
配置Apache部分 1.修改Apache中Httpd.conf文件 <Location /server-status> SetHandler server-status Order de ...
- 使用LoadRunner监控Apache
前提本文使用的是lampp环境下自带的Apache服务 一.查看文件 查看文件确保目录中有Apache,我在这里使用的是用xampp自带apache [root@besttest ~]# ll 二.配 ...
- LR监控Apache资源
前提本文使用的是lampp环境下自带的Apache服务 步骤1.修改Apache中Httpd.conf文件,添加如下代码:文件位置为:/opt/lampp/etc/httpd.conf,如下图: &l ...
- LoadRunner监控Linux
rstat协议允许网络上的用户获得同一网络上各机器的性能参数. 需要下载3个包: (1)rsh-0.17-14.i386.rpm (2)rsh-server-0.17-14.i386.r ...
- LoadRunner监控Unix、Windows方法及常用性能指标
目 录 一.LoadRunner监控Linux资源.... 3 (一).准备工作... 3 1.可以通过两种方法验证服务器上是否配置了rstatd守护程序:... 3 (2)使用find命令... ...
- LoadRunner监控Linux资源
一.LoadRunner监控Linux资源 (一).准备工作 首先,监视Linux一定要有rstatd这个守护进程,有的Linux版本里也有可能是rpc.rstatd这里只是名字不同而已,功能是一样的 ...
- 应用LR监控Apache性能
1)对Apache服务器中的http.conf进行如下配置修改Apache中Httpd.conf文件,添加如下代码(该文件中都有,只要取消注释就好了)<Location /server-stat ...
随机推荐
- 安装配置Elasticserch的方法
1.安装java环境 先查看环境是否安装 yum list installed |grep java 如果存在自带的环境则卸载 yum -y remove java--openjdk* 查看安装包 y ...
- (7)case语句
(1)case 语法 case "变量" in 模式1) 命令序列1 ;; 模式2) 命令序列2 ;; 模式3) 命令序列3 ;; *) 无匹配后命令序列 esac (2)多系统配 ...
- (20)python pycharm
使用GitHub 一·登录GitHub 1. 2. 3. 4. 二. 登录成功后再配置git 1 2.创建项目到github 3.下载github
- POJ 3083 Children of the Candy Corn (DFS + BFS + 模拟)
题目链接:http://poj.org/problem?id=3083 题意: 这里有一个w * h的迷宫,给你入口和出口,让你分别求以下三种情况时,到达出口的步数(总步数包括入口和出口): 第一种: ...
- SPOJ UOFTCG - Office Mates (树的最小路径覆盖)
UOFTCG - Office Mates no tags Dr. Baws has an interesting problem. His N graduate students, while f ...
- [xsy2962]作业
题意:$f_0=1-\dfrac1e,f_n=1-nf_{n-1}$,求$f_n(n\leq10000)$,保留四位小数 这题代码只有⑨行但是题解很神... 因为递推式中有乘法,所以直接按题目来推肯定 ...
- 【暴力】UVALive - 4882 - Parenthesis
就不断地扫整个序列,如果发现多余的括号就删除.大概复杂度还是O(n²)左右.如何判断不合法请详见代码. To a computer, there is no difference between th ...
- 【分块】bzoj2120 数颜色
分块,在每个点记录一下它之前离它最近的相同颜色的位置pre[i],显然问题转化成了求[l,r]中pre[i]<l的值的个数. 这是分块擅长的,在每个块内记录有序表,查询时对零散的暴力,整块的二分 ...
- js创建json对象
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- Java下List<Long>转List<String>或者List<Long>转List<Integer>
说明:很遗憾,没有快速方法,只能遍历然后循环增加进去. 方法: for(String str : list) { int i = Integer.paseInt(str); intList.add(i ...