control端配置:
1。拷貝weblogic(就是被監控的對象)安裝目錄下的lib檔案夾下(具體為:D:\bea\weblogic81\server\lib \weblogic.jar)的weblogic.jar到LR根目錄classer檔案夾下(具體為:C:\Program Files\Mercury Interactive\Mercury LoadRunner\classes);
2。刪除LR根目錄下該檔案夾下(具體為:C:\Program Files\Mercury Interactive\Mercury LoadRunner\classes)的jmxri.jar
3. 在LR的dat/monitors下的(具體為:C:\Program Files\Mercury Interactive\Mercury LoadRunner\dat\monitors\weblogiMon.ini)中JVM的路徑和版本,指向當前系統的最新虛擬機器,推薦1.4.2,配置好後具體為:
JVM=C:\Program Files\Java\j2re1.4.2_04\bin\javaw.exe
JavaVersion=1.4.2
同時可以在weblogiMon.ini檔案中修改監控時的連接埠:如:
Weblogic=weblogic.jar
Port=7001
weblogic 所在機器的配置
1.在weblogic控制台的安全性的user處建立一個user,name設定為weblogic.admin.mbeam,密碼隨便設定;
2。將目前使用者的group根據需要添加(不知道時需要給這個使用者administrators,monitors這兩個組的許可權);
3。LR中control下weblogic(jxm) 添加監視器,name寫上IP:連接埠。如(10.19.129.15;或者192.168.1.127:7001)
4.確認後輸入之前在console中建立的使用者名稱和密碼,確認後就可以開啟BEA的監視器選擇介面了。
監控j2ee時需要安裝並配置j2ee_Monitors
1、需要找到 j2ee_Monitors 安裝包
2、在硬碟上建立一個目錄,如: merc_monitor_home
3,將安裝盤中的\add-ins\monitors\j2ee\windows\jmonitor_nt.jar (windows) 檔案解壓到該目錄,如果沒有解壓縮工具,使用如下方法: \bin\jar.exe -xf 如果jmonitor_nt.jar 不是在merc_monitor_home目錄下,需要加完整的目錄.
( unix下,使用jar公用程式提取安裝jar:轉到merc_monitor_home【上面建立的目錄】目錄並鍵入以下命令: jar -xvf jmonitor_nt.jar ),如果jmonitor_nt.jar 不是在merc_monitor_home目錄下,需要加完整的目錄,在unix下解壓可能會丟失它們的執行許可權,要修複此錯誤,請開啟如果 jmonitor_nt.jar 所在的目錄,然後使用如下命令列更改許可權,chmod + x*.sh )
4.然後雙擊 merc_monitor_home【上面建立的目錄】\classes\sipatool.jar(這裡是解壓成功後才有的目錄和檔案),以開啟Mercury.j2ee monitor initializer .
(在unix平台下,如果不能雙擊開啟,可以按照如下操作進行:
merc_monitor_home【上面建立的目錄】\classes\ 目錄中, 鍵入 java -jar sipatool.jar ) 【實際在windows下也可以這麼做】
4.在隨後彈出的介面中 已經 顯示了 java啟動並執行主目錄,如果沒有顯示,則需要自己手工添加進入。
5、餘下的工作是要把安裝的監控目錄,和監控程式添加到 weblogic啟動設定檔中,具體如下:
a.備份weblogicstart.cmd檔案,並取一個新的名稱,通常為:weblogicstartMercury.cmd 設定監控主目錄:如:set MERC_MONITOR_HOME=C:\J2EE_Monitors
b.把監控路徑加入啟動路徑如:%MERC_MONITOR_HOME%\dat;%MERC_MONITOR_HOME%\classes\xerces.jar;
後面是一個已經完全配置好的weblogicstartMercury.cmd 檔案:
@ECHO OFF
@REM WARNING: This file is created by the Configuration Wizard.
@REM Any changes to this script may be lost when adding extensions to this configuration.
SETLOCAL
@REM *************************************************************************
@REM This script is used to start WebLogic Server for the domain in the
@REM current working directory. This script simply sets the SERVER_NAME
@REM variable and starts server.
@REM
@REM To create your own start script for your domain, all you need to set is
@REM SERVER_NAME, then starts the server.
@REM
@REM Other variables that startWLS takes are:
@REM
@REM WLS_USER - cleartext user for server startup
@REM WLS_PW - cleartext password for server startup
@REM PRODUCTION_MODE - true for production mode servers, false for
@REM development mode
@REM JAVA_OPTIONS - Java command-line options for running the server. (These
@REM will be tagged on to the end of the JAVA_VM and MEM_ARGS)
@REM JAVA_VM - The java arg specifying the VM to run. (i.e. -server,
@REM -hotspot, etc.)
@REM MEM_ARGS - The variable to override the standard memory arguments
@REM passed to java
@REM
@REM For additional information, refer to the WebLogic Server Administration
@REM Console Online Help(http:\\e-docs.bea.com\wls\docs81\ConsoleHelp\startstop.html)
@REM *************************************************************************
@REM Initialize the common environment.
set WL_HOME=C:\bea\weblogic81
for %%i in ("%WL_HOME%") do set WL_HOME=%%~fsi
set PRODUCTION_MODE=
set JAVA_VENDOR=BEA
set MERC_MONITOR_HOME=C:\J2EE_Monitors
set JAVA_HOME=C:\bea\jrockit8sp4_142_05
for %%i in ("%JAVA_HOME%") do set JAVA_HOME=%%~fsi
@REM Call commEnv here AFTER setting the java_vendor to get common environmental settings.
call "%WL_HOME%\common\bin\commEnv.cmd"
@REM Set SERVER_NAME to the name of the server you wish to start up.
set SERVER_NAME=myserver
set CLASSPATH=%WEBLOGIC_CLASSPATH%;%MERC_MONITOR_HOME%\dat;%MERC_MONITOR_HOME%\classes\xerces.jar;%POINTBASE_CLASSPATH%;%JAVA_HOME%\jre\lib\rt.jar;%WL_HOME%\server\lib\webservices.jar;%CLASSPATH%
@REM Call WebLogic Server
echo .
echo CLASSPATH=%CLASSPATH%
echo .
echo PATH=%PATH%
echo .
echo ***************************************************
echo * To start WebLogic Server, use a username and *
echo * password assigned to an admin-level user. For *
echo * server administration, use the WebLogic Server *
echo * console at http:\\[hostname]:[port]\console *
echo ***************************************************
%JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -Xbootclasspath/p:%MERC_MONITOR_HOME%\classes\boot -Dweblogic.Name=%SERVER_NAME% -Dweblogic.ProductionModeEnabled=%PRODUCTION_MODE% -Djava.security.policy="%WL_HOME%\server\lib\weblogic.policy" weblogic.Server
ENDLOCAL
///來源網路