最近在研究自动化测试

LoadRunner Monitor Linux System material

上一篇 / 下一篇  2008-09-12 16:06:15

   今天用LoadRuner来监控Linux系统资源,遇到了一点麻烦,不过还是解决了,下面将操作的过程描述如下:

1. 首先在Linux服务器上安装rpc.rstatd服务,这里用的是rpc.rstatd-4.0.1.tar.gz安装包,如果没有可以到该网址上去下载:http://sourceforge.net/projects/rstatd

2. 执行安装包:

   解压安装包:tar -xvzf rpc.rstatd-4.0.1.tar.gz

   进入安装包:cd rpc.rstatd-4.0.1.tar.gz

   配置rpc.rstatd: ./configure

   编译rpc.rstatd: make

   安装rpc.rstatd: make install

3. 重新启动xinetd:  /etc/init.d/xinetd restart;

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

   即设置:disable=no,保存;

5. 启动rpc.rstatd并查看是否真正启动该服务:

   【root@localhost~】#rpc.rstatd

   【root@localhost~】#rpcinfo -p

   结果如下:

  

   从上图中可以看出rpc.rstatd服务已经启动

6. 启动LoadRunner并监控Linux系统资源:

   在controller中,将System resource Graphs中的Unix resources拖到右侧的监控区域中,并单击

   鼠标右键选择“Add Measurements”,在弹出的对话框中输入被监控的linux系统的IP地址,然后选择需

   要监控的性能指标,并点击“确定”,出现如下结果:

   Monitor name :UNIX Resources. Cannot initialize the monitoring on 10.10.15.62. 
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.
RPC-TCP: Failed to communicate with the portmapper on host '10.10.15.62'.
RPC: RPC call failed.
RPC-TCP: recv()/recvfrom() failed.
RPC-TCP: Timeout reached. (entry point: CFactory::Initialize). [MsgId: MMSG-47190]

   检查原因,发现是Linux系统中的防火墙开启了并且阻挡了LoadRunner监控Linux系统的资源,因此要将

   防火墙关闭。

7.关闭防火墙: [root@localhost ~]# /etc/init.d/iptables stop;

8. 重复步骤6,成功后结果如下图所示:

  

   通过上面的实例可以得知,有些时候防火墙也会阻止一些服务或功能,只要关闭它即可。

 

 


TAG:

 

评分:0

我来说两句

日历

« 2024-04-29  
 123456
78910111213
14151617181920
21222324252627
282930    

数据统计

  • 访问量: 14803
  • 日志数: 14
  • 文件数: 1
  • 书签数: 1
  • 建立时间: 2008-02-25
  • 更新时间: 2011-12-21

RSS订阅

Open Toolbar