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

二、配置文件
1、进入该目录
[root@besttest ~]# cd /opt/lampp/etc
2、查看目录中是否有httpd.conf文件
[root@besttest etc]# ls
3、修改httpd.conf
[root@besttest etc]# vi httpd.conf
4、按键盘insert建进行修改,将该段放到最末尾
(注意:以下代码在有的httpd.conf文件中都有,只要取消注释就好了,但是因为文件内容太多,我懒得找,所以我直接放在最末尾,也是一样的。)
<Location /server-status>
SetHandler server-status
Order deny,allow
# Deny from all
Allow from .localhost
</Location>
5、代码后边如果没有以下内容则添加,状态为on
ExtendedStatus On

6、按一下键盘esc建,再输入:wq进行保存
三、重启lampp
[root@besttest etc]# /opt/lampp/lampp restart
四、验证是否配置成功
1、输入下面的地址进行监控数据(192.168.0.133为本机IP)
http://192.168.0.133/server-status/?auto
2、出现以下内容说明就配置成功

五、Loadrunner配置
1、切换到LoadRunner的Controller中在Web Server Resource Graphs下双击Apache,右侧出现Apache视图
2、右击选择 Add Measurements,点击add,添加apache服务器IP地址、选择系统平台、选择需要监控的性能指标,确认。


六、错误分析
1、运行后发下有错误提示内容如下:
Monitor name :Apache. Parsing error, cannot find token: CPULoad. Measurement: CPULoad|192.168.0.108. 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]
2、错误分析:
这是由于要监视Apache的版本提供的计数器与LoadRunner默认的计数器不一致导致的。
3、解决办法:
建议先关闭Controller,打开LR安装目录C:\Program Files (x86)\HP\LoadRunner\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) ,描述信息也建议修改。
(3)然后保存并关闭该文件,重新打开Controller并添加计数器,这样监视就正常了。
使用LoadRunner监控Apache的更多相关文章
- 使用LoadRunner监控Apache的步骤 (转)
一.Apache上的设置 打开<Apache Installation>/conf/httpd.conf,进行如下修改: 1. 设置允许查看Apache运行状态的主机 # # Allow ...
- 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服务
一.apache配置步骤(假设apache服务已安装) 1.使用find / -name httpd.conf命令查找httpd.conf文件 2.使用cd opt/lampp/apache2/con ...
- 应用LR监控Apache性能
1)对Apache服务器中的http.conf进行如下配置修改Apache中Httpd.conf文件,添加如下代码(该文件中都有,只要取消注释就好了)<Location /server-stat ...
- LoadRunner监控Linux
rstat协议允许网络上的用户获得同一网络上各机器的性能参数. 需要下载3个包: (1)rsh-0.17-14.i386.rpm (2)rsh-server-0.17-14.i386.r ...
- cacti监控apache和nginx的配置
一.监控apache1.下载http://forums.cacti.net/about25227.html&highlight=apachestats2.其中的ss_apache_stats. ...
- 教你如何监控 Apache?
什么是 Apache? Apache 是一款 HTTP 服务器软件,现在更名为 "http",而 Apache 则成了一个(包含httpd的项目)巨大的基金组织,根据习惯后文都用 ...
- LoadRunner监控Unix、Windows方法及常用性能指标
目 录 一.LoadRunner监控Linux资源.... 3 (一).准备工作... 3 1.可以通过两种方法验证服务器上是否配置了rstatd守护程序:... 3 (2)使用find命令... ...
随机推荐
- WPFの触发器详解
例子1 简单触发器Triggers——满足简答的条件,触发 <Window x:Class="Styles.SimpleTriggers" xmlns="http: ...
- eclipse 附加进程调试java程序(转)
转自:http://blog.csdn.net/zhoushenghuang/article/details/54485645 第一步,启动Java程序时需要设置JVM参数 右击java项目-> ...
- python请求基本库使用
高级用法 http://cn.python-requests.org/zh_CN/latest/user/quickstart.html#url 3.2 requests 源码 def request ...
- jQuery 菜单 水平菜单的实现
html <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <ti ...
- 【串线篇】Mybatis入门
MyBatis是持久化层框架(SQL映射框架)-操作数据库 一.环境搭建 1).创建一个java工程,java工程就行: 2). 创建表:自己用工具创建 创建javaBean:Employee(封装表 ...
- java web项目获取项目路径
注意:有时获取到的项目路径后再+“自定义路径后” 路径不可用,这时要看下项目里自定义路径是不是空文件夹,如果是空文件夹则调试和运行时文件夹不会编译到部署文件里. 1.方法一 调试时只能获取eclips ...
- python3.x current_question
扩散四维过程遇到的问题,暂不能解决,但先收集起来. ''' list_str=['test', None, '', 'str', ' ', 'END'] data = filter(lambda st ...
- Qt 样式表鼠标滑过按钮更改Text文本颜色
QSS语法参考http://blog.csdn.net/liang19890820/article/details/51691212 Qt助手上也有比较详细的说明,选择器以及伪选择器,现在只是做个简单 ...
- python3 线程调用与GIL 锁机制
转载
- An Easy Introduction to CUDA C and C++
An Easy Introduction to CUDA C and C++ This post is the first in a series on CUDA C and C++, which i ...