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

Linux下安装LoadRunner(LoadGenerator)

上一篇 / 下一篇  2011-11-12 23:57:15 / 个人分类:loadrunner

文章来源
  • 文章来源:【原创】

1.      HP的官方网站上下载LoadRunner9.5 Linux安装程序[T7177-15009.iso],安装文档[hp_man_LRIG9.50_01_pdf.pdf]

!}.Lc$z3@7u L0

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

!k9@!mk#i^0

51Testing软件测试网1h/UiV8P E O2v

2.      安装包的处理

%d[gT,{T0

1.      ZIP解压:unzip TLRNUX900WC_00.zip

9|(h}ZfgwK\0

2.      挂载ISOmkdir /mnt/LoadRunner ; mount -t iso9660 -o loop T7177-15009.iso /mnt/LoadRunner51Testing软件测试网'V@*N4R@b&c)Ii!m.l

9TD%P r|N5Z0

3.      开始安装,以LR9.5为例:51Testing软件测试网oxZO.C:D*]

/mnt/LoadRunner/Linux/installer.sh

zYX$B(y dB@0

按提示操作,直接Next到完成。

4g0x?[&jA,_s0L0

51Testing软件测试网%G U/NN-L&f o&D S

4.      添加用户和环境变量

#]6a+A spR%G"w0

useradd -g 0 -s /bin/csh higkoo51Testing软件测试网 |V+b5`3GK7Z T

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

F:N&NcDE0

cat /opt/HP/HP_LoadGenerator/env.csh >~higkoo/.cshrc51Testing软件测试网 Z Ky @)Q8N

touch ~root/.rhosts ~higkoo/.rhosts51Testing软件测试网[7B7pVM)]Y_R

51Testing软件测试网3D&I,DG4}?0z

5.      检查运行环境(在本机或使用VNC执行):

-] G\,a,b4n9I0

su - higkoo

)\)CxVHhS2i^0

cd /opt/HP/HP_LoadGenerator/bin/

7Q$q SG `[m6?0

./verify_generator51Testing软件测试网1g*M&vC6_Z} za

S*@ih3Y"|#T0

6.      启动服务(用新增的用户higkoo):51Testing软件测试网&}2~-I4Q r*g

cd /opt/HP/HP_LoadGenerator/bin/51Testing软件测试网 p.tw*|dD%Nm

./m_daemon_setup start51Testing软件测试网8DO QP,e'xZL

`-T wr*J"^3P P0

7.      检查是否启动51Testing软件测试网y,aA2z T0f

ps aux | grep m_agent_daemon51Testing软件测试网on'S1T'BLji

netstat -naop | grep 54345

6NLLJ5eyC ` N0

51Testing软件测试网/|)gw\9N

8.      注意事项51Testing软件测试网 d s~'n!I

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

Q)K.]LM|vjc0

51Testing软件测试网gG5Y%?,Nk*Ki

51Testing软件测试网(E1T;WC*dD7OE

正确设置后用verify_generator的检测结果是:51Testing软件测试网tA9Imz ?;U ^D

./verify_generator51Testing软件测试网I$Sh0a&F j3Cw

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

:rf(~7Q9dr ec'u$b0

              HP

| W:^@7l m*s|0

     Vuser Environment Verification Utility

){5{opL'mF5yU0

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

_"RXH6E0

m*VD8Pc4k0

Product: HP LoadRunner 9.5051Testing软件测试网e2d h\2[dj8~_z

Version: 09.50.0000

E%M2[A_V S0

Build: 3378

6BZ g ?2K3}e0

higkoolincn100ce5:51Testing软件测试网;v-W I^+D8c0Vt

{`[X0K;@2g2B'M0

verify_generator...OK51Testing软件测试网/OB @\vg

verify_generator...OK

'c9pn;|N ~ E]1q0d(o5v0

verify_generator...OK51Testing软件测试网 aD~-K^

Don't forget to make sure that the name of the controller machine

(VUlZj0

is also in .rhosts51Testing软件测试网7mO E;u S K

verify_generator...OK51Testing软件测试网(J*Zk SA)R {

verify_generator...OK51Testing软件测试网O^}q?2u;A\ D

verify_generator...OK51Testing软件测试网Q&y8HE5h+W+@ T0O~9K {

verify_generator...OK51Testing软件测试网-_*@,U&iF Y0y

verify_generator...OK

4nU2a|8S,HO @0

verify_generator...OK51Testing软件测试网(F,G7cTcVz

verify_generator...OK

P1UeGyE&E$[0

_______________________________________________

z?7t-e"Xc/_0

+x+o2f#m|4YY0

Summary:

6K4Q P-O M#r0

________51Testing软件测试网{G ?^!Gg7H UBx

Vuser Host higkoolincn100ce5: OK

{Kj(JPvsZ}G0

HLa#l;v0OB0

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

!S#E9aB9B,]CS }n0



L"oxZJ Q0

若使用RSH连接,则负载机必须安装RSH并正确配置,正如检测过程中描述的“Don't forget to make sure that the name of the controller machine”。

PeI7Uo;c@0

B7G+}9bT,f0

51Testing软件测试网G9b0p%qwO#L

补充,Linux下似乎只支持Web/Http协议的脚本。譬如WinSock协议,从名称上都知道只适合Windows51Testing软件测试网p:e w&oOk2iW]

    “Error (-81024): LR_VUG: The 'WinSock' type is not supported on 'LINUX' platforms .”

?%X)[KXb0

另外试了Java协议,确实不行,报错如下:

'^!R!TS6C;|0

    Error (-81024): LR_VUG: The 'General-Java' type is not supported on 'LINUX' platforms .51Testing软件测试网-_.k^*x&Q"}GgKV

依赖库:yum -y --disablerepo=\* --enablerepo=AutoInstaller --nogpgcheck --skip-broken localinstall /mnt/CentOS_Final/CentOS/compat-libstdc++-33-3.2.3-61.i386.rpm51Testing软件测试网,I]x7{/r/GHw

否则会报:m_agent_daemon: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory51Testing软件测试网e o!e+K|(lh:L

注意hosts文件的配置,如果机器名和hosts里配置不一致也会导致LoadRunner启动失败,51Testing软件测试网FgVQ!XF5_7G

譬如:Error: Communication error: Failed to get the server host IP by calling the gethostbyname function.51Testing软件测试网s9A'{d:g\

附上给LoadRunner定制的系统服务脚本(/etc/init.d/loadrunner):51Testing软件测试网j(MFfmryg

#!/bin/bash 
# /etc/init.d/loadrunner
# Loadrunner负载生成器服务

DAEMON=m_daemon_setup
ARGV="$@"
DIR=/opt/HP/HP_LoadGenerator/bin/
USER=higkoo

UBIT="su - $USER -c "51Testing软件测试网T4`[5s&y%B u3g!k&f

$UBIT "cd $DIR && ./$DAEMON $ARGV"

运行服务:51Testing软件测试网S3{'Q6E[W\Y

service loadrunner start

w+{i*IA0

m_agent_daemon ( 1808 ),51Testing软件测试网s&L Z-N'`1Z0F


TAG: 性能测试 LoadRunner loadrunner

引用 删除 ffyy505   /   2012-02-03 14:24:50
求安装包啊 T7177-15009.iso

邮箱:ffyy505@163.com
Paulawang的个人空间 引用 删除 Paulawang   /   2011-12-28 10:50:08
ebay上海急聘高级性能测试工程师,联系QQ:498761418;MSN:wangchunyan2011@live.cn
 

评分:0

我来说两句

Open Toolbar