使用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命令... ...
随机推荐
- js 监听input 实现数据绑定
<!DOCTYPE html> <html> <head> <script> function checkField(val) { //alert(&q ...
- 选择 NoSQL 需要考虑的 10 个问题
那么我为什么要写这篇文章呢? 是因为我认为NoSQL解决方案不如RDBMS解决方案吗?当然不! 是因为我专注于SQL的做事方式,而不想陷入一种相对较新的技术的不确定性吗?不,也不是!事实上,我非常兴奋 ...
- vue项目在webpack打包后背景图片显示不了
加上 publicPath:'../../'即可
- 自定义 MessageBox 组件
效果: 公共组件页面: js部分: <script> export default { props: { title: { type: String ...
- mqtt haproxy 代理及负载搭建
目录 mqtt 分布集群搭建 haproxy 安装配置 解压 安装 配置haproxy.cfg 启动haproxy 配置mqtt 测试 负载配置说明 负载均衡算法 ACL规则定义 全局配置 默认配置 ...
- for循环(C语言型)语法
- 一、Vue分页实现
一.Vue分页实现 <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equ ...
- mongoose 与 mylab 的使用 (1)
1.引入mongoose 模块 const mongoose = require('mongoose'); 2.连接数据库 //连接数据库 mongoose.connect( db, {useNew ...
- python常用技巧 — 杂
目录: 1. 找到字符串中的所有数字(python find digits in string) 2. python 生成连续的浮点数(如 0.1, 0.2, 0.3, 0.4, ... , 0.9) ...
- Halo(五)
ApplicationPreparedEvent 监听事件 Event published once the application context has been refreshed but be ...