Linux下安装LoadRunner(LoadGenerator)以及如何清理lr在linux产生的临时文件(NewModi)
2015-10-21 10:03
696 查看
1. 在HP的官方网站上下载LoadRunner9.5 的Linux安装程序[T7177-15009.iso],安装文档[hp_man_LRIG9.50_01_pdf.pdf];安装程序包括Hp、Ibm、Linux、Solaris系统的支持(LR9.0对应安装文件为[TLRNUX900WC_00.zip])。 2. 安装包的处理: (1). ZIP解压:unzip TLRNUX900WC_00.zip
(2). 挂载ISO:mkdir /mnt/LoadRunner ;
mount -t iso9660 -o loop T7177-15009.iso /mnt/LoadRunner3. 开始安装,以LR9.5为例:/mnt/LoadRunner/Linux/installer.sh 按提示操作,直接Next到完成。4. 添加用户和环境变量:bash环境下,所以在root目录找到.bashrc文件,添加以下几句话:export PRODUCT_DIR=/opt/HP/HP_LoadGeneratorexport M_LROOT=$PRODUCT_DIRexport LD_LIBRARY_PATH=${M_LROOT}/binexport PATH=${M_LROOT}/bin:$PATH需要注消再登录后bash生效。 useradd -g 0 -s /bin/csh testcat /opt/HP/HP_LoadGenerator/env.csh > /etc/.logincat /opt/HP/HP_LoadGenerator/env.csh >~test/.cshrctouch ~root/.rhosts ~test/.rhosts 5. 检查运行环境(在本机或使用VNC执行):su - test cd /opt/HP/HP_LoadGenerator/bin/ ./verify_generator6. 启动服务(用新增的用户test):cd /opt/HP/HP_LoadGenerator/bin/./m_daemon_setup start 7. 检查是否启动:ps aux | grep m_agent_daemon netstat -naop | grep 54345 8. 注意事项:开启端口54345或关闭防火墙(service iptables stop)正确设置后用verify_generator的检测结果是: ./verify_generator=================================================== HP Vuser Environment Verification Utility =================================================== Product: HP LoadRunner 9.50 Version: 09.50.0000 Build: 3378higkoolincn100ce5:verify_generator...OKverify_generator...OK verify_generator...OKDon't forget to make sure that the name of the controller machineis also in .rhosts verify_generator...OK verify_generator...OK verify_generator...OKverify_generator...OK verify_generator...OKverify_generator...OK verify_generator...OK _______________________________________________ Summary:________ Vuser Host higkoolincn100ce5: OK 使用Controller连接,在“UNIX Environment Tab”下选择“Don't use RSH ”即可连接Linux负载机。 若使用RSH连接,则负载机必须安装RSH并正确配置,正如检测过程中描述的“Don't forget to make sure that the name of the controller machine”。补充,Linux下似乎只支持Web/Http协议的脚本。譬如WinSock协议,从名称上都知道只适合Windows: “Error (-81024): LR_VUG: The 'WinSock' type is not supported on 'LINUX' platforms .” 另外试了Java协议,确实不行,报错如下: Error (-81024): LR_VUG: The 'General-Java' type is not supported on 'LINUX' platforms .依赖库:yum -y --disablerepo=\* --enablerepo=AutoInstaller --nogpgcheck --skip-broken localinstall /mnt/CentOS_Final/CentOS/compat-libstdc++-33-3.2.3-61.i386.rpm 否则会报:m_agent_daemon:error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory 注意hosts文件的配置,如果机器名和hosts里配置不一致也会导致LoadRunner启动失败,譬如:Error: Communication error: Failed to get the server host IP by calling the gethostbyname function.。附上给LoadRunner定制的系统服务脚本(/etc/init.d/loadrunner):#!/bin/bash # /etc/init.d/loadrunner# Loadrunner负载生成器服务DAEMON=m_daemon_setupARGV="$@"DIR=/opt/HP/HP_LoadGenerator/bin/USER=higkooUBIT="su - $USER -c "$UBIT "cd $DIR && ./$DAEMON $ARGV"运行服务:service loadrunner startm_agent_daemon ( 1808 )------------------------------------------------------------------****************************************************************************************遇见过的问题:
os中没有安装csh,因此怎么配置在跳转到配置用户的时候永远出现/bin/csh文件不存在 安装软件:/lib/ld-linux.so.2: bad ELF interpreter解决
failed to execute /bin/csh: 没有那个文件或目录
yum install tcsh./m_agent_daemon: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directoryyum whatprovides libstdc++.so.5yum install compat-libstdc++-33使用的时候出现一个错误bash: /usr/local/bin/rar: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory是因为64位系统中安装了32位程序解决方法:yum install glibc.i686重新安装以后还有如下类系错误 再继续安装包error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directoryyum install libstdc++.so.6PS:在使用一段时间linux的generator后会产生大量临时文件,存储在tmp下brr_开头的文件夹都是lr产生的临时文件,用如下方法清空cd /tmprm -rf brr_*环境:[orangle@localhost Downloads]$ uname -m&&uname -rx86_642.6.32-220.el6.x86_64[orangle@localhost Downloads]$ cat /etc/redhat-release CentOS release 6.2 (Final)PS:其他问题可以参考http://blog.csdn.net/crisschan/article/details/8988953
相关文章推荐
- linux文件系统安全(一)
- linux账户及登录安全
- vi操作
- linux远程访问及认证安全
- Linux 的启动流程
- Linux基础学习3
- 修改linux内核开机logo并居中全屏显示
- Linux 常用基础命令
- Linux时间戳和标准时间的互转-zz
- linux下批量替换文件内容
- 每天一个linux命令(16):which命令
- 后台开发用到的工具,远程控制Linux工具
- Linux扩展根分区大小
- 如何在Windows下将文件压缩成tgz格式的压缩包 linux系统 centos下
- 解决linux自动挂载U盘/SD Card变成只读问题
- linux 查看系统负载 详解
- Linux运维 第三阶段 (八)理解LAMP
- 亲手打造自己的 Linux 桌面环境
- (笔记)Linux下的ioctl()函数详解
- Linux终端查看