Linux下安装LoadRunner(LoadGenerator)

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/LoadRunner

3.      开始安装,以LR9.5为例:
/mnt/LoadRunner/Linux/installer.sh
 按提示操作,直接Next到完成。
4.      添加用户和环境变量:
useradd -g 0 -s /bin/csh higkoo
cat /opt/HP/HP_LoadGenerator/env.csh > /etc/.login
cat /opt/HP/HP_LoadGenerator/env.csh >~higkoo/.cshrc
touch ~root/.rhosts ~higkoo/.rhosts
 
5.      检查运行环境(在本机或使用VNC执行):
 su - higkoo
 cd /opt/HP/HP_LoadGenerator/bin/
 ./verify_generator

6.      启动服务(用新增的用户higkoo):
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: 3378
higkoolincn100ce5:
verify_generator...OK
verify_generator...OK
verify_generator...OK
Don't forget to make sure that the name of the controller machine
is also in .rhosts
verify_generator...OK
verify_generator...OK
verify_generator...OK
verify_generator...OK
verify_generator...OK
verify_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_setup
ARGV="$@"
DIR=/opt/HP/HP_LoadGenerator/bin/
USER=higkoo
UBIT="su - $USER -c "
$UBIT "cd $DIR && ./$DAEMON $ARGV"
运行服务:
service loadrunner start
m_agent_daemon ( 1808 ),

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值