51Testing软件测试论坛

 找回密码
 (注-册)加入51Testing

QQ登录

只需一步,快速开始

微信登录,快人一步

查看: 9396|回复: 6
打印 上一主题 下一主题

LoadRunner监控Linux步骤和问题

[复制链接]

该用户从未签到

跳转到指定楼层
1#
发表于 2015-4-24 19:11:31 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
按以下资料安装的rstatd 最后发现在LR添加linux资源,图中只记录了开始时的数据就几个点,时间轴走的后面都没有数据,等时间走过后,下面的记录也变成空的。不知道问题出在哪里。
发出来问一下大家,自己也当做存档。资源都是网上找来的。



========来自百度整合资料========

LoadRunner监控Linux

rstat协议允许网络上的用户获得同一网络上各机器的性能参数。


======准备工作:======
[root@localhost /]# cat /etc/redhat-release   查看系统版本
[root@localhost /]# rpm -qa 软件名  查看已安装的软件
[root@localhost /]# rpm -e 软件名   卸载软件
需要下载3个包:
(1)rsh-0.17-14.i386.rpm
(2)rsh-server-0.17-14.i386.rpm
(3)rpc.rstatd-4.0.1.tar.gz
个人安装中还装了其它依赖包,这几个最好提前安装
yum install make
yum install gcc
yum install xinetd
    --启动xinetd
    方法一:/etc/init.d/xinetd restart
    方法二:# service xinetd start
yum install portmap
    --启动portmap(端口映射服务,在redhat6.0后的版本改为rpcbind)
    service rpcbind start

或者直接挂载系统盘,这样可以省去找依赖包的麻烦
mount -o loop /dev/sr0 /mnt


一.查看是否安装并卸载rsh
[root@localhost /]# rpm –qa |grep rsh      --查看是否安装rsh
[root@localhost /]# rpm –e + 版本号   --卸载该版本

安装rsh,rsh-server(要安装与系统位数一样的版本)
[root@localhost /]# rpm –ivh rsh-0.17-14.i386.rpm
[root@localhost /]# rpm –ivh rsh-server-0.17-14.i386.rpm
有挂载系统盘可以使用
yum install rsh
yum install rsh-server


启动rsh服务,rsh属于xinetd服务,只要xinetd重启
# service xinetd restart

检查是否启动: rsh server监听的TCP是514。
方法一:
    [root@mg04 root]# netstat -an |grep 514
    tcp 0 0 0.0.0.0:514 0.0.0.0:* LISTEN  
    如果能看到514在监听说明rsh服务器已经启动。
方法二:setup 查看服务中的rsh是否有打*号。


二、安装rstatd
下载地址:http://sourceforge.net/projects/rstatd,上传至/usr/local
查看是否安装rstatd
[root@localhost /]# find / -name rpc.rstatd

安装rstatd
[root@localhost /]# tar -xzvf rpc.rstatd-4.0.1.tar.gz
[root@localhost /]# cd rpc.rstatd-4.0.1
[root@localhost /]# ./configure
[root@localhost /]# make
[root@localhost /]# make install
--------安装中如果有提示少依赖包,
直接使用yum install 包名

三、安装完成后配置rstatd目标守护进程xinetd,配置文件于/etc/xinet.d目录下,这个文件没有做修改。(这个文件要安装xinetd后才有)
修改/etc/xinetd.d目录下面的3个conf(rogin,rsh,rexec)中的disable均设置为no (这三个文件要安装rsh后才有)
[root@localhost /]# cd /etc/xinetd.d      --进入到/etc/xinetd.conf目录中
[root@localhost /]# vi rlogin     --编辑disable=no,保存
[root@localhost /]# vi rsh  --编辑disable=no,保存
[root@localhost /]# vi rexec --编辑disable=no,保存
重启服务
[root@localhost /]# service xinetd restart


四、启动rpc.rstatd
[root@localhost /]# rpc.rstatd --启动rpc.rstatd进程
[root@localhost /]# rpcinfo -p --执行此命令检查rpc服务的状态
程序    版本 协议 端口
100001    5   udp    937  rstatd
100001    4   udp    937  rstatd
100001    3   udp    937  rstatd
100001    2   udp    937  rstatd
100001    1   udp    937  rstatd
如果未出现上图的rstatd说明没有安装成功,需要重复以上步骤。
到这里为止,LR监控Linux必要的服务都已安装好了。

五、关闭防火墙
[root@localhost /]# iptables -L    查看防火墙状态
[root@localhost /]# service iptables stop

六、LR中的Controller监控Linux资源
在Controller中,将System Resource Graphs中的Unix resources拖到右侧的资源监控区域。
鼠标右键选择Add Measurements,添加被监控Linux的IP地址x.x.x.x,选择需要监控的性能指标,确认。



问题:
1、在启动rpc.rstatd时,会报错“Cannot register service: RPC: Unable to receive; errno = Ction refused”。
解决方法如下:
# /etc/init.d ./portmap start
# /etc/init.d ./nfs start
然后再次启动rpc.rstatd就好了。

2. 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,服务未开启的原因造成的。

3. configure: error: no acceptable C compiler found in $PATH
原因:未安装gcc编译器. 在命令行里敲入gcc –v, 如果提示command not found 就表示你的系统里没有安装gcc编译器
解决办法:yum install gcc









本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?(注-册)加入51Testing

x
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏4
回复

使用道具 举报

该用户从未签到

推荐
发表于 2015-12-12 11:32:38 | 只看该作者
如果需要监控Linux,虽然这种方式可行,但我建议你使用另外两种方式:
1,使用HP的SiteScope进行监控,SiteScope本生可以和LR集成
2,使用Nmon(Linux版本)进行服务器监控 (下载地址:http://sourceforge.net/projects/nmon/)
回复 支持 1 反对 0

使用道具 举报

  • TA的每日心情

    2015-11-23 16:30
  • 签到天数: 49 天

    连续签到: 1 天

    [LV.5]测试团长

    4#
    发表于 2015-11-23 16:29:35 | 只看该作者
    很好的帖子
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    无聊
    2015-11-27 11:18
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]测试小兵

    5#
    发表于 2015-11-27 11:11:01 | 只看该作者
    修改/etc/xinetd.d目录下面的3个conf(rogin,rsh,rexec)中的disable均设置为no (这三个文件要安装rsh后才有)
    [root@localhost /]# cd /etc/xinetd.d      --进入到/etc/xinetd.conf目录中
    [root@localhost /]# vi rlogin     --编辑disable=no,保存
    [root@localhost /]# vi rsh  --编辑disable=no,保存
    [root@localhost /]# vi rexec --编辑disable=no,保存
    回复 支持 反对

    使用道具 举报

  • TA的每日心情
    无聊
    2015-11-27 11:18
  • 签到天数: 1 天

    连续签到: 1 天

    [LV.1]测试小兵

    6#
    发表于 2015-11-27 11:12:07 | 只看该作者
    修改/etc/xinetd.d目录下面的3个conf(rogin,rsh,rexec)中的disable均设置为no (这三个文件要安装rsh后才有)
    [root@localhost /]# cd /etc/xinetd.d      --进入到/etc/xinetd.conf目录中
    [root@localhost /]# vi rlogin     --编辑disable=no,保存
    [root@localhost /]# vi rsh  --编辑disable=no,保存
    [root@localhost /]# vi rexec --编辑disable=no,保存
    为什么我在CentOs系统上安装之后却找不到这三个文件呢?
    回复 支持 反对

    使用道具 举报

    本版积分规则

    关闭

    站长推荐上一条 /1 下一条

    小黑屋|手机版|Archiver|51Testing软件测试网 ( 沪ICP备05003035号 关于我们

    GMT+8, 2024-5-6 22:11 , Processed in 0.072513 second(s), 24 queries .

    Powered by Discuz! X3.2

    © 2001-2024 Comsenz Inc.

    快速回复 返回顶部 返回列表