Linux下安装LoadRunner(LoadGenerator)
上一篇 / 下一篇 2012-08-04 11:51:38 / 个人分类:loadrunner
文章来源
- 文章来源:【转载】
1. 在HP的官方网站上下载LoadRunner9.5 的Linux安装程序[T7177-15009.iso],安装文档[hp_man_LRIG9.50_01_pdf.pdf];51Testing软件测试网yD ]9xWw+X r
安装程序包括Hp、Ibm、Linux、Solaris系统的支持(LR9.0对应安装文件为[TLRNUX900WC_00.zip])。
Q2R,W6K0]!vD-`0K ?5[%]9]0
2. 安装包的处理:
Fi0N[s4Q-U\-?01. ZIP解压:unzip TLRNUX900WC_00.zip51Testing软件测试网&HB/n7r)Nrd(^.G&\
2. 挂载ISO:mkdir /mnt/LoadRunner ; mount -t iso9660 -o loop T7177-15009.iso /mnt/LoadRunner
9^!F+wt5Z5G x'M-mSD0%{*j:s;t*mi%d9I0
3. 开始安装,以LR9.5为例:
-go(sd'f2r^4^hM/H*E0/mnt/LoadRunner/Linux/installer.sh
zH+^xOX x-E0按提示操作,直接Next到完成。
moT+O9TN R,sQg06c6}H8_w,k+p0
4. 添加用户和环境变量:
h7^9U,s.Cb0useradd -g 0 -s /bin/csh higkoo
(Y7?6Nl3O NFM`0cat /opt/HP/HP_LoadGenerator/env.csh > /etc/.login
D&j6a7ra6M\e0cat /opt/HP/HP_LoadGenerator/env.csh >~higkoo/.cshrc51Testing软件测试网7_-]~ XP4h[
touch ~root/.rhosts ~higkoo/.rhosts51Testing软件测试网Jn$y0E[
51Testing软件测试网"B JFLKln$qX
5. 检查运行环境(在本机或使用VNC执行):51Testing软件测试网*hc/r&|!hYJjr
su - higkoo
!l o6f,UKD0cd /opt/HP/HP_LoadGenerator/bin/51Testing软件测试网/Qk&YQp0nO
./verify_generator
1^4k;fXP%y$J051Testing软件测试网:roJ~@N+e T
6. 启动服务(用新增的用户higkoo):
aFUp,Ty0cd /opt/HP/HP_LoadGenerator/bin/51Testing软件测试网G$L-LWw~
./m_daemon_setup start
,^7r@4B#O5@,T4uw:h051Testing软件测试网,C t(DrLG,dg
7. 检查是否启动:
{{ E4sP0ps aux | grep m_agent_daemon
|t m(f%e7tO QG9C0netstat -naop | grep 5434551Testing软件测试网$r1D3}e ^h]1G!w[
51Testing软件测试网!f3m f%gN
8. 注意事项:
K)wb*O7W]d x5H0开启端口54345或关闭防火墙(service iptables stop)
o+kM,m*B0QZj'S*N3@)k0
ef,]kFg0
正确设置后用verify_generator的检测结果是:
W1h9w%m4{m)b0./verify_generator51Testing软件测试网u3h-s3g&t;LF/u[ ===================================================51Testing软件测试网7I8g1H"wLX^i HP51Testing软件测试网:U8{[!~:]3L-oy1C Vuser Environment Verification Utility m0FZ7h~O0=================================================== Jb5G3re06K6i8s*^U)h0 Product: HP LoadRunner 9.5051Testing软件测试网9f1wd\3xAH"? Version: 09.50.000051Testing软件测试网%ac%j o;E#o Build: 3378 q*t+g:tE{H7S0higkoolincn100ce5: 2srI;DUs4B C0@}0D!o,HgY vQc0 verify_generator...OK vZG]m6s!X.t&M'w0verify_generator...OK51Testing软件测试网g o kk.^ verify_generator...OK51Testing软件测试网w7K4Nm*Fe"{R? Don't forget to make sure that the name of the controller machine (w)W1@:l H+hu0is also in .rhosts S'K~\7e0verify_generator...OK #J^4R:{&~*g~E^)q0verify_generator...OK51Testing软件测试网&@x^8l$U!^1y verify_generator...OK51Testing软件测试网$p jcJC verify_generator...OK51Testing软件测试网-i7|+p-gAm verify_generator...OK51Testing软件测试网 K'Z5Y5A6_ verify_generator...OK51Testing软件测试网 Q Vm}Ts*~p#ir verify_generator...OK G] fn!SP H0_______________________________________________ |Q%rVVgr+~051Testing软件测试网t;{DSj Y Summary:51Testing软件测试网Zt)nZ.a I ________ NZ?6o a&K egdC0Vuser Host higkoolincn100ce5: OK }EL4r"op4m%g6g5i0 |
51Testing软件测试网-jS8l{c&aI4h^g
使用Controller连接,在“UNIX Environment Tab”下选择“Don't use RSH ”即可连接Linux负载机。
YlyrZ(y0若使用RSH连接,则负载机必须安装RSH并正确配置,正如检测过程中描述的“Don't forget to make sure that the name of the controller machine”。51Testing软件测试网XR V)i7J5\S9l-l&`A
^z/UI:h%uw;G:RO,P+M0
5M@N+\p8s0
补充,Linux下似乎只支持Web/Http协议的脚本。譬如WinSock协议,从名称上都知道只适合Windows:
'l }*m"k2U |:x1a0“Error (-81024): LR_VUG: The 'WinSock' type is not supported on 'LINUX' platforms .”51Testing软件测试网*k~#X u^0z
另外试了Java协议,确实不行,报错如下:
Fx%x ]q*_W5R0Error (-81024): LR_VUG: The 'General-Java' type is not supported on 'LINUX' platforms .51Testing软件测试网/g}\ eD
依赖库:yum -y --disablerepo=\* --enablerepo=AutoInstaller --nogpgcheck --skip-broken localinstall /mnt/CentOS_Final/CentOS/compat-libstdc++-33-3.2.3-61.i386.rpm
MUu\4~ pi8Km0否则会报:m_agent_daemon: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory
wX$Eoo&Nf0j0注意hosts文件的配置,如果机器名和hosts里配置不一致也会导致LoadRunner启动失败,51Testing软件测试网Oi*ZJi#c6pUd
譬如:Error: Communication error: Failed to get the server host IP by calling the gethostbyname function.。51Testing软件测试网v[ `sUob!w
附上给LoadRunner定制的系统服务脚本(/etc/init.d/loadrunner):51Testing软件测试网;T1AXz%B
# /etc/init.d/loadrunner
# Loadrunner负载生成器服务
DAEMON=m_daemon_setup
ARGV="$@"
DIR=/opt/HP/HP_LoadGenerator/bin/
USER=higkoo
UBIT="su - $USER -c "
!x.k3h_@ n1FX0$UBIT "cd $DIR && ./$DAEMON $ARGV"运行服务:
T'I;W2v&o2mP&Y0service loadrunner start
*iHO@]`0m_agent_daemon ( 1808 ),51Testing软件测试网4G(]!n&s:G