LoadRunner如何监控Linux系统资源


一 简述:LoadRunner监控Linux资源时弹出如下错误:

Monitor name :UNIX Resources. Cannot initialize the monitoring on 192.168.52.189. Error while creating the RPC client. Ensure that the machine can be connected and that it runs the rstat daemon (use rpcinfo utility for this verification). Detailed error: RPC: Failed to create RPC client.

RPC-TCP: Failed to establish RPC server address.

上述问题的实质是Linux系统中未安装rpc.rstatd,服务未开启的原因造成。

于是接下来就验证我们的推测:

首先查看rpc.rstatd是否安装

[root@localhost bin]# whereis rpc.rstatd

发现系统未安装rpc.rstatd

备注:rstatd Rstat协议允许网络上的用户获得同一网络上各机器的性能参数。

二 准备下载包:下载rpc.rstatd-4.0.1.tar.gz安装包

下载地址:http://sourceforge.net/projects/rstatd

利用ssh客户端上传rpc.rstatd-4.0.1.tar.gz包至Linux下/home/Michael/tool/目录下

三 执行安装程序包:

tar -xzvf  rpc.rstatd-4.0.1.tar.gz   //解压rcp.rstatd

cd  rpc.rstatd-4.0.1//进入到rpc.rstatd目录中

./configure  //配置rc.rstatd的安装,以下我的是按照默认方式的

make  //编译rc.rstatd

make install   // 安装

四 重启xinetd

/etc/init.d/xinetd restart

五 修改etc/xinetd.d目录下面的3个conf (rlogin, rsh, rexec)中的disable置均设置为no

cd /etc/xinetd.d   //进入到etc/xinetd.conf目录中

Virlogin //编辑disable=no,保存

Virsh// 编辑disable=no,保存

Virexec //编辑disable=no,保存

六 启动rpc.rstatd和检测

rpc.rstatd//启动rpc.rstatd进程

rpcinfo –p  // 执行此命令检查rpc服务的状态

[root@localhost xinetd.d]# rpcinfo -p

程序版本协议   端口

1000002   tcp111  portmapper

1000002   udp111  portmapper

1000241   udp  32768  status

1000241   tcp  32769  status

1000015   udp867  rstatd

1000013   udp867  rstatd

1000012   udp867  rstatd

1000011   udp867  rstatd

七 利用Loadunner中的Controller监控Linux资源

1  在controller中,将Systeme Resourece Graphs中的UNIX resources拖到右键的资源监控区域

2  鼠标右键选择Add Measurements,添加被监控linux的IP地址192.168.52.189,选择需监控的性能指标,确认

  1. 监视Linux系统资源的使用情况
  2. Linux系统自动化管理: 远程登录
  3. 在Linux系统上实现虚拟主机的注意事项

相关内容