LoadRunner如何监控Linux下的系统资源
Posted hahatest
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了LoadRunner如何监控Linux下的系统资源相关的知识,希望对你有一定的参考价值。
1. 安装rsh,rsh-server
[[email protected] /]# yum install rsh
[[email protected] /]# yum install rsh-server
或者
[[email protected] /]#yum -y install rsh*
![技术分享图片](https://image.cha138.com/20210619/def894343dee4eb2949bcafff9864ce3.jpg)
2. 安装rstatd
下载并安装rstatd,下载地址:http://sourceforge.net/projects/rstatd(下载rpc.rstatd-4.0.1.tar.gz),上传至/usr/local
查看是否安装,一般来说Linux都没有安装
[[email protected] /]# find / -name rpc.rstatd
安装rstatd
[[email protected] /]# tar -xzvf rpc.rstatd-4.0.1.tar.gz
[[email protected] /]# ./configure
![技术分享图片](https://image.cha138.com/20210619/925f5e300481442cb52cf919df852889.jpg)
![技术分享图片](https://image.cha138.com/20210619/dbf946f15ce54781b8e0791b598144fc.jpg)
![技术分享图片](https://image.cha138.com/20210619/1edeb1d4423e4d2e9ce631fe19eb365d.jpg)
![技术分享图片](https://image.cha138.com/20210619/62080ce07f6a48198f8f367a618acc93.jpg)
继续安装yum -y install gcc gcc-c++
![技术分享图片](https://image.cha138.com/20210619/eab66907903042df9ef5ef994fc995ec.jpg)
还是失败;继续yum -y install gcc automake autoconf libtool make
再./configure,看下图,显示成功
[[email protected] /]# make
![技术分享图片](https://image.cha138.com/20210619/5962730185a448da840528149569c3e8.jpg)
[[email protected] /]# make install
![技术分享图片](https://image.cha138.com/20210619/a33a3885ef40470ebce6302b3684590d.jpg)
3. 安装完成后配置rstatd目标守护进程xinetd,配置文件于/etc/xinet.d目录下修改/etc/xinetd.d目录下面的3个conf(rogin,rsh,rexec)中的disable均设置为no
[[email protected] /]# cd /etc/xinetd.d --进入/etc/xinetd.conf目录中
[[email protected] /]# vi rlogin --编辑disable=no,保存
[[email protected] /]# vi rsh --编辑disable=no,保存
[[email protected] /]# vi rexec --编辑disable=no,保存
4. 启动rpc.rstatd
[[email protected] /]# rpc.rstatd --启动rpc.rstatd进程
![技术分享图片](https://image.cha138.com/20210619/123e3f277a72411da2e64c13c68293dc.jpg)
注意:
portmap在centos6中改名为rpcbind
yum install rpcbind(centos6)
yum install portmap(centos5)
我的是centos6,所以安装yum install rpcbind(一般系统本身就带有rpcbind)
在检查一下
[[email protected] /]# rpcinfo -p --执行此命令检查rpc服务的状态
到这里为止,LR监控Linux必要的服务都已安装好了。
![技术分享图片](https://image.cha138.com/20210619/77ecd4eee4674cfcb5e055dde3d2a889.jpg)
如上图可以看到,如果开启了四个rstatd服务就说明,该rpc守护进程服务启动是成功的(服务安装和启动是成功的)
5. 关闭防火墙
[[email protected] /]# iptables -L 查看防火墙状态
[[email protected] /]# service iptables stop
chkconfig iptables on //永久性启动防火墙
chkconfig iptables off //永久性关闭防火墙
6. LR中的Controller监控Linux资源
在Controller中,将System Resource Graphs中的Unix resources拖到右侧的资源监控区域。鼠标右键选择Add Measurements,添加被监控Linux的IP地址x.x.x.x,选择需要监控的性能指标,确认。
参考:
http://www.51testing.com/html/29/279629-3693914.html
https://blog.csdn.net/kellyruan/article/details/51498530
以上是关于LoadRunner如何监控Linux下的系统资源的主要内容,如果未能解决你的问题,请参考以下文章