十五年测试老手,长期负责WEB\APP 项目测试,目前主要负责团队管理工作。

Linux下安装LoadRunner(LoadGenerator)

上一篇 / 下一篇  2012-08-04 11:51:38 / 个人分类:loadrunner

文章来源
  • 文章来源:【转载】
51Testing软件测试网 B"\P6C't.o

3s1A:]S4Z~m0

1.      HP的官方网站上下载LoadRunner9.5 Linux安装程序[T7177-15009.iso],安装文档[hp_man_LRIG9.50_01_pdf.pdf]51Testing软件测试网yD ]9xWw+Xr

安装程序包括HpIbmLinuxSolaris系统的支持(LR9.0对应安装文件为[TLRNUX900WC_00.zip])。

Q2R,W6K0]!vD-`0

 

K ?5[%]9]0

2.      安装包的处理

Fi0N[s4Q-U\-?0

1.      ZIP解压:unzip TLRNUX900WC_00.zip51Testing软件测试网&HB/n7r)Nrd(^.G&\

2.      挂载ISOmkdir /mnt/LoadRunner ; mount -t iso9660 -o loop T7177-15009.iso /mnt/LoadRunner

9^!F+wt5Z5G x'M-m SD0

 

%{*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+O9TNR,sQg0

 

6c6}H8_w,k+p0

4.      添加用户和环境变量

h7^9U,s.Cb0

useradd -g 0 -s /bin/csh higkoo

(Y7?6Nl3O NFM`0

cat /opt/HP/HP_LoadGenerator/env.csh > /etc/.login

D&j6a7ra6M\e0

cat /opt/HP/HP_LoadGenerator/env.csh >~higkoo/.cshrc51Testing软件测试网7_-]~ XP4h[

touch ~root/.rhosts ~higkoo/.rhosts51Testing软件测试网Jn$y0E[

 51Testing软件测试网"BJ FLKl n$qX

5.      检查运行环境(在本机或使用VNC执行):51Testing软件测试网*hc/r&|!hYJjr

su - higkoo

!l o6f,UKD0

cd /opt/HP/HP_LoadGenerator/bin/51Testing软件测试网/Qk&YQp0nO

./verify_generator

1^4k;fXP%y$J0

 51Testing软件测试网:roJ~@N+e T

6.      启动服务(用新增的用户higkoo):

aFUp,Ty0

cd /opt/HP/HP_LoadGenerator/bin/51Testing软件测试网G$L-LWw~

./m_daemon_setup start

,^7r@4B#O5@,T4uw:h0

 51Testing软件测试网,C t(DrLG,dg

7.      检查是否启动

{{ E4sP0

ps aux | grep m_agent_daemon

|t m(f%e7tO QG9C0

netstat -naop | grep 5434551Testing软件测试网$r1D3}e ^h]1G!w[

 51Testing软件测试网!f3mf%gN

8.      注意事项

K)wb*O7W] d x5H0

开启端口54345或关闭防火墙(service iptables stop

o+kM,m*B0

 

QZj'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

===================================================

Jb5G3re0

 

6K6i8s*^U)h0

Product: HP LoadRunner 9.5051Testing软件测试网9f1wd\3xAH"?

Version: 09.50.000051Testing软件测试网%ac%j o;E#o

Build: 3378

q*t+g:t E{H7S0

higkoolincn100ce5:

2srI;DU s4B C0

 

@}0D!o,HgY vQc0

verify_generator...OK

vZG]m6s!X.t&M'w0

verify_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+hu0

is also in .rhosts

S'K~\7e0

verify_generator...OK

#J^4R:{&~*g~E^)q0

verify_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!S P H0

_______________________________________________

| Q%rVVgr+~0

 51Testing软件测试网t;{DSjY

Summary:51Testing软件测试网Zt)nZ.a I

________

NZ?6oa&K egdC0

Vuser Host higkoolincn100ce5: OK

}EL4r"op4m%g6g5i0

 51Testing软件测试网-jS8l{c&aI4h^g

使用Controller连接,在“UNIX Environment Tab”下选择“Don't use RSH ”即可连接Linux负载机。

YlyrZ(y0



sS:g9fn0

若使用RSH连接,则负载机必须安装RSH并正确配置,正如检测过程中描述的“Don't forget to make sure that the name of the controller machine”。51Testing软件测试网X R V)i7J5\S9l-l&`A

 

^z/UI:h%u w;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*_W5R0

    Error (-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&N f0j0

注意hosts文件的配置,如果机器名和hosts里配置不一致也会导致LoadRunner启动失败,51Testing软件测试网Oi*ZJ i#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软件测试网;T1AX z%B

 
#!/bin/bash 
# /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&Y0

service loadrunner start

*iHO@]`0

m_agent_daemon ( 1808 ),51Testing软件测试网4G(]!n&s:G@O

z3z;C(H3KV{7_0

q/j_DCbG9G^}9T0

TAG:

邱建忠的个人空间 引用 删除 邱建忠   /   2013-08-28 10:30:13
找不到安装软件....求分享
 

评分:0

我来说两句

Open Toolbar