InfraRED Performance Tool Setup on Unix for Weblogic

Recently, I got a chance to do hands on (InfraRED Performance Tool setup and work on) this J2EE performance testing tool. While going through documentation available on internet, I noticed that everything is in windows operating system context. Hence I had to change all configuration to suite unix environment. It was weblogic 8.1 on unix. It did eat up some time. Hence thought of sharing those installation details.

Here are the steps and the bit of extra we do on unix while doing Infrared setup.

Infrared performance tool

InfraRED Performance Tool Setup Steps:

1. Download and extract the details. Set Infrared home to INFRARED_HOME=extraction directory of Infrared. e.g. if you have extracted the contents to /opt/xxx/xxxx/infrared/infrared-2.4.1.BETA, then set the home directory as –

export INFRARED_HOME=/opt/xxx/xxxx/infrared/infrared-2.4.1.BETA

2. Next is preparing JVM. First step is preparing enhanced class loader. Run following two commands. Second will generate enhanced.jar in Infrared home directory which is already set above to /opt/xxx/xxxx/infrared/infrared-2.4.1.BETA.

export CLASSPATH=$INFRARED_HOME/aspectwerkz-core-2.0.jar:$JAVA_HOME/lib/tools.jar:$CLASSPATH

java org.codehaus.aspectwerkz.hook.Plug -target $INFRARED_HOME/enhanced.jar

As it is weblogic we need to set weblogic bootclasspath to use everything related to Infrared. To achieve this startWeblogic.sh or startManagedWeblogic.sh needs to be modified. This is how startWeblogic.sh will look after modification.

########################################################################################

#!/bin/sh

# WARNING: This file is created by the Configuration Wizard.

# Any changes to this script may be lost when adding extensions to this configuration.

# *************************************************************************

# This script is used to start WebLogic Server for the domain in the

# current working directory.  This script simply sets the SERVER_NAME

# variable and starts server.

#

# To create your own start script for your domain, all you need to set is

# SERVER_NAME, then starts the server.

#

# Other variables that startWLS takes are:

#

# WLS_USER     – cleartext user for server startup

# WLS_PW       – cleartext password for server startup

# PRODUCTION_MODE    – true for production mode servers, false for

#                development mode

# JAVA_OPTIONS – Java command-line options for running the server. (These

#                will be tagged on to the end of the JAVA_VM and MEM_ARGS)

# JAVA_VM      – The java arg specifying the VM to run.  (i.e. -server,

#                -hotspot, etc.)

# MEM_ARGS     – The variable to override the standard memory arguments

#                passed to java

#

# For additional information, refer to the WebLogic Server Administration

# Console Online Help(/ConsoleHelp/startstop.html)

# *************************************************************************

# Initialize the common environment.

WL_HOME=”/opt/bea/weblogic81″

PRODUCTION_MODE=””

JAVA_VENDOR=”Sun”

JAVA_HOME=”/utils/j2se1.4.2_05″

INFRARED_HOME=”/opt/xxx/xxxx/infrared/infrared-2.4.1.BETA”

# Call commEnv here AFTER setting the java_vendor to get common environmental settings.

. ${WL_HOME}/common/bin/commEnv.sh

# Set SERVER_NAME to the name of the server you wish to start up.

SERVER_NAME=”myServer”

CLASSPATH=”${WEBLOGIC_CLASSPATH}:${POINTBASE_CLASSPATH}:${JAVA_HOME}/jre/lib/rt.jar:${WL_HOME}/server/lib/webservices.jar:${CLASSPATH}”

export CLASSPATH

JAVA_OPTIONS=”-Xbootclasspath/p:${INFRARED_HOME}/enhanced.jar -Xbootclasspath/a:${INFRARED_HOME}/infrared-aspectsystem-all-2.4.1.BETA.jar -Daspectwerkz.classloader.preprocessor=net.sf.infrared.weaverhook.ClassPreProcessorAdaptor ${JAVA_OPTIONS}”

export JAVA_OPTIONS

CLASSPATH=”${INFRARED_HOME}/infrared-agent-all-weblogic-2.4.1.BETA.jar:${INFRARED_HOME}/aspectjweaver-1.5.0.jar:${CLASSPATH}”

export CLASSPATH

# Call WebLogic Server

echo “.”

echo “CLASSPATH=${CLASSPATH}”

echo “.”

echo “PATH=${PATH}”

echo “.”

echo “JAVA_OPTIONS=${JAVA_OPTIONS}”

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} -Dweblogic.Name=${SERVER_NAME} -Dweblogic.management.username=weblogic -Dweblogic.management.password=weblogic -Dweblogic.ProductionModeEnabled=${PRODUCTION_MODE} -Djava.security.policy=”${WL_HOME}/server/lib/weblogic.policy” weblogic.Server 2>&1 >/home/xxx/logs/weblogic.stdout.log &

echo “Check /home/xxx/logs/weblogic.log” for server status”

########################################################################################

3. Last step that you need to do differently is changing the infrared-agent.properties. You may want to give your own server and port name instead of default ‘localhost’ and ‘7777’.

collection-strategy.ccs.remotehost = xxxxx

collection-strategy.ccs.port = nnnn

All these things along with other installation steps on Infrared site will integrate your application with Infrared.

References:

InfraRED Site

Be the first to comment

Leave a Reply

Your email address will not be published.


*