Chinaunix首页 | 论坛 | 博客
  • 博客访问: 117563
  • 博文数量: 14
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 184
  • 用 户 组: 普通用户
  • 注册时间: 2011-03-01 23:15
个人简介

我只是一个喜欢开发的测试,喜欢测试的开发,喜欢每天都知道得更多一些,更深入一些的感觉。。。。。

文章分类

全部博文(14)

文章存档

2015年(5)

2014年(2)

2013年(7)

分类: LINUX

2014-05-15 21:39:33

Loadrunner监控Linux系统资源

 

Loadrunner中要监控Linux系统资源,需要在Linux服务器上启动rpc.rstatd服务。如果在Loadrunner中选择了"UNIX Resources"报如下的错误

 
 

Monitor name :UNIX Resources. Cannot
  initialize the monitoring on 192.168.91.211. 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: RPC Server <100001, 3, 17>
  is not registered on host '192.168.91.211'. (entry point:
  CFactory::Initialize).     [MsgId:  MMSG-47190]
 

 

或者没有报错但也没有数据的话,那就是没启动rpc.rstatd服务,或者是rpc.rstatd服务配置有问题,可按如下步骤安装、配置、启动rpc.rstatd服务。

 

一、    安装rsh

检查是否安装了rsh


[root@RHEL211 /]# rpm -qa|grep rsh 

rsh-server-0.17-60.el6.x86_64 

rsh-0.17-60.el6.x86_64 

[root@RHEL211 /]# 

这说明已经安装了rsh,如果没有安装则需要下载和操作系统匹配的rsh安装包安装。



 
[root@RHEL211 /]# rpm –ivh  rsh-0.17-60.el6.x86_64.rpm 

[root@RHEL211 /]# rpm –ivh  rsh-server-0.17-60.el6.x86_64.rpm 


二、    安装rpc.rstatd

检查是否安装了rpc.rstatd



 

[root@RHEL211 /]# find / -name rpc.rstatd

/usr/sbin/rpc.rstatd

[root@RHEL211 /]# 

这说明已经安装了rpc.rstatd,如果没有安装则需要下载和操作系统匹配的rpc.rstatd安装包安装。



 

[root@RHEL211 /]# tar  -xzvf  rpc.rstatd- x.x.x.tar.gz 

[root@RHEL211 /]# cd  rpc.rstatd-x.x.x 

[root@RHEL211 /]# ./configure 

[root@RHEL211 /]# make 

[root@RHEL211 /]# make install 


三、配置rpc.rstatd守护进程xinetd

修改/etc/xinetd.d目录下的rloginrshrexec三个文件,将其中的disable都修改为no



 

[root@RHEL211 ~]# cd /etc/xinetd.d 

[root@RHEL211 xinetd.d]# vi rlogin 

# default: on 

# description: rlogind is the server for  the rlogin(1) program.  The server \ 

# provides a remote login facility with authentication based on \ 

# privileged port numbers from trusted hosts. 

service login
{      
        
socket_type             = stream
       
        
wait                    = no
      
        
user                    = root
       
        
log_on_success          +=  USERID
       
        
log_on_failure          +=  USERID
       
        
server                  =  /usr/sbin/in.rlogind
 

         disable                 = no

}


 

[root@RHEL211 xinetd.d]# vi rsh 

# default: on 

# description: The rshd server is the  server for the rcmd(3) routine and, \ 

# consequently, for the rsh(1) program.  The server provides \ 

# remote execution facilities with authentication based on \ 

# privileged port numbers from trusted hosts.
 

service shell 

{               
          
socket_type             = stream
      
          
wait                    = no
       
          
user                    = root
       
          
log_on_success          += USERID
       
          
log_on_failure          +=  USERID
       
          
server                  =  /usr/sbin/in.rshd
 

           disable                 = no 

}


 

[root@RHEL211 xinetd.d]# vi rexec 

# default: off 

# description: Rexecd is the server for  the rexec(3) routine.  The server \ 

# provides remote execution facilities with authentication based \

# on user names and passwords.
 

service exec 

{       
          
socket_type             = stream
       
          
wait                    = no
       
          
user                    = root
       
          
log_on_success          +=  USERID
       
          
log_on_failure          +=  USERID
       
          
server                  =  /usr/sbin/in.rexecd
 

           disable                 = no 

} 


 

四、    启动rpc.rstatd



 

[root@RHEL211 xinetd.d]# rpc.rstatd 


启动rpc.rstatd,重启也可以用这命令。启动后可检查rpc服务的状态:



 

[root@RHEL211 xinetd.d]# rpcinfo -p  
 
program vers proto   port  service
   
 
100000    4   tcp     111  portmapper
    
 
100000    3   tcp     111  portmapper
    
 
100000    2   tcp     111  portmapper
   
 
100000    4   udp     111  portmapper
   
 
100000    3   udp     111  portmapper
   
 
100000    2   udp    111  portmapper
   
 
100024    1   udp   51710  status
   
 
100024    1   tcp   39023  status
   
 
100001    3   udp     966  rstatd
   
 
100001    2   udp     966  rstatd
   
 
100001    1   udp     966  rstatd
 

[root@RHEL211 xinetd.d]# 


五、    关闭防火墙



 

[root@RHEL211 xinetd.d]# service iptables  stop 

 

到此Linux服务端已经可以允许同一子网中另一台机器上的Loadrunner监控了。







阅读(2507) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~