Profiling a server allows you to analyze performance, threading,
and memory usage when running a web application. In some cases, you
must setup environment variables on the target host computer before
starting the server in profile-mode. The environment variables must
be set before you start the server for profiling. On computers running z/OS® you also need to set permissions
on directories used by Rational® Agent Controller.
Determining if you must manually set environment variables
for profiling
In some cases, you do not need to manually
set environment variables on the target computer when profiling; they
are set automatically for you by the workbench. However, in some cases
you must set the environment variables manually. The following factors
determine if it is necessary to manually set environment variables,
as well as which environment variables to set:
- If the target computer for the server is the same computer where
the workbench is installed (local server) or if the server is on a
different computer (remote server).
- If the user ID has write access the /java/jre/bin/ directory for WebSphere® Application Server
(local server).
- The version of Rational Agent Controller installed (remote server).
The following table shows the conditions when environment
variables are set automatically or must be set manually.
Table 1. Scenarios for setting environment variables automatically or manually
when profilingEnvironment variable |
Local server |
Remote server |
- PATH
- LD_LIBRARY_PATH
- LIBPATH
|
Set automatically by the workbench. |
Set automatically if remote server is using Rational Agent Controller V8.3
or later. Otherwise, set manually.Note: You must ensure
that the LIBPATH environment variable includes
the path <XML Toolkit installation directory>/xml4c-5_7/lib. For example, if you installed
the XML toolkit at /usr/lpp/ixm/IBM/xml4c-5_7 then the LIBPATH environment variable must contain the path: LIBPATH=/usr/lpp/ixm/IBM/xml4c-5_7/lib. See the section
|
TPTP_AC_HOME |
Set automatically by the workbench. |
Set automatically if remote server is using Rational Agent Controller V8.3
or later. Otherwise, set manually. |
PROBEKIT_HOME (Needed only If you are using
the Probe Insertion monitor option.) |
Set automatically by the workbench. |
Set manually. |
JAVA_PROFILER_HOME |
Set automatically by the workbench |
Set automatically if remote server is on Windows or Linux operating system using Rational Agent Controller V8.3 or later.
Otherwise, set manually. |
Manually setting profiling environment variables for
a local server
For a server running on the same machine
as the workbench, complete the following steps:
- Locate the following plugin folders under the installation directory
of the IBM® Rational Software Delivery Platform
Note: Always pick the plugin with the latest version number and time stamp
when multiple versions of the same plugin exist.
Table 2. Paths to plugins used to define environment variables for profiling
on a local serverDescription |
Plugin path |
<Agent Controller Home> |
- <install_dir>\IBMIMShared\plugins\org.eclipse.tptp.platform.ac.win_<XXXX>\agent_controller
- <install_dir>/IBMIMShared/plugins/org.eclipse.tptp.platform.ac.linux_<XXXX>/agent_controller
where <install_dir> is
the installation directory of the IBM Rational Software
Delivery Platform and <XXXX> depends on the architect of the operating system. Substitute <XXXX> with your appropriate processor
by selecting ia32 for a 32-bit processor, em64 for a
64-bit processor, or ipf for an Itanium Processor Family processor, for example org.eclipse.tptp.platform.ac.win_ia32_<n.n.n>.v<yyyymmddtttt>, where <n.n.n> is a version number, and <yyyymmddtttt> is a date and time stamp of the plugin. |
<Probekit Home> |
- <install_dir>\IBMIMShared\plugins\org.eclipse.hyades.probekit<n.n.n>.v<yyyymmddtttt>\os\win32\x86
- <install_dir>/IBMIMShared/plugins/org.eclipse.hyades.probekit<n.n.n>.v<yyyymmddtttt>/os/linux/x86
where <install_dir> is
the installation directory of the IBM Rational Software
Delivery Platform and <XXXX> depends on the architect of the operating system. Substitute <XXXX> with your appropriate processor
by selecting ia32 for a 32-bit processor, em64 for a
64-bit processor, or ipf for an Itanium Processor Family processor, for example org.eclipse.tptp.platform.ac.win_ia32_<n.n.n>.v<yyyymmddtttt>, where <n.n.n> is a version number, and <yyyymmddtttt> is a date and time stamp of the plugin. |
- Setup the following environment variables before you start
the workbench and the application server. Open a command prompt and
type the following commands by replacing <Agent
Controller Home> and the optional <Probekit Home> with the plugin paths determined
in the previous step:
set TPTP_AC_HOME=<Agent Controller Home>
set PROBEKIT_HOME=<Probekit Home>
set PATH=%TPTP_AC_HOME%\bin;%TPTP_AC_HOME%\lib;%PROBEKIT_HOME%;%PATH%
export TPTP_AC_HOME=<Agent Controller Home>
export PROBEKIT_HOME=<Probekit Home>
export LD_LIBRARY_PATH=$TPTP_AC_HOME/bin:$TPTP_AC_HOME/lib:$PROBEKIT_HOME:$LD_LIBRARY_PATH
Manually setting environment variables for profiling
on a remote server
For application servers running on a
different computer than the workbench, complete the following steps:
Note: If you are profiling a remote application server, you must install Rational Agent Controller on
the same machine where the application server is located. Verify that
environment variable settings listed below are picked up by the startup
process of the application server.
On the computer where
the remote application server is located, manually set any environment
variables
before you start the workbench and the application
server. You can manually set the following environment variables on
the target system by replacing <
AC installation
directory> with the installation directory of Rational Agent Controller.
In addition, if you are using the
Probe Insertion monitor option,
specify the PROBEKIT_HOME environment variable:
set TPTP_AC_HOME=<AC installation directory>
set JAVA_PROFILER_HOME=%TPTP_AC_HOME%\plugins\org.eclipse.tptp.javaprofiler
set PROBEKIT_HOME=%TPTP_AC_HOME%\plugins\org.eclipse.hyades.probekit
set PATH=%JAVA_PROFILER_HOME%;%TPTP_AC_HOME%\bin;%TPTP_AC_HOME%\lib;%PROBEKIT_HOME%\lib;%PATH%
export TPTP_AC_HOME=<AC installation directory>
export JAVA_PROFILER_HOME=$TPTP_AC_HOME$/plugins/org.eclipse.tptp.javaprofiler
export PROBEKIT_HOME=$TPTP_AC_HOME$/plugins/org.eclipse.hyades.probekit
export LD_LIBRARY_PATH=$JAVA_PROFILER_HOME:$TPTP_AC_HOME/bin:$TPTP_AC_HOME/lib:$PROBEKIT_HOME/lib:$LD_LIBRARY_PATH
export TPTP_AC_HOME=<AC installation directory>
export JAVA_PROFILER_HOME=$TPTP_AC_HOME$/plugins/org.eclipse.tptp.javaprofiler
export PROBEKIT_HOME=$TPTP_AC_HOME$/plugins/org.eclipse.hyades.probekit
export LIBPATH=$JAVA_PROFILER_HOME:$TPTP_AC_HOME/bin:$TPTP_AC_HOME/lib:$PROBEKIT_HOME/lib:$LIBPATH
export TPTP_AC_HOME=<AC installation directory/RACzOS64 or 31bit>
export JAVA_PROFILER_HOME=$TPTP_AC_HOME$/plugins/org.eclipse.tptp.javaprofiler
export XERCESC_HOME=<XML Toolkit installation directory>/xml4c-5_7/lib
export PROBEKIT_HOME=$TPTP_AC_HOME$/plugins/org.eclipse.hyades.probekit
export LIBPATH=$JAVA_PROFILER_HOME:$TPTP_AC_HOME/bin:$TPTP_AC_HOME/lib:$XERCESC_HOME/lib:$PROBEKIT_HOME/lib:$LIBPATH
where <XML Toolkit installation directory> is typically /usr/lpp/ixm/IBM.
Note: If
you enabled security when you installed Rational Agent Controller, then enter the
following commands:
- extattr +ap <Rational Agent Controller directory>/lib/*
- extattr +ap <Rational Agent Controller directory>/plugins/org.eclipse.tptp.javaprofiler/*
- extattr +ap <XML Toolkit installation directory>/xml4c-5_7/lib/*
Starting the workbench
Once you have set
the required environment variables, start the IBM Rational Software Delivery Platform workbench from a command prompt such
that the environment variables are picked up by the workbench process.
For example, run the following command:
C:\Program Files\IBM\SDP>eclipse
/opt/IBM/SDP>./eclipse
Note: When profiling with WebSphere Application Server,
the environment variables setup can be added in the file setupCmdLine.bat (Windows) or setupCmdLine.sh (Linux) found in the /bin folder of the server installation.
Setting the file permissions
for profiling on z/OS
If you are profiling on z/OS, then you must have read and execute permissions on the
following directories (and all directories in their path):
- <Rational Agent Controller installation directory>/lib/*
- <Rational Agent Controller installation directory>/plugins/org.eclipse.tptp.javaprofiler/*
- <XML Toolkit installation directory>/xml4c-5_7/lib*
Note: All directories in the path to these directories also
need read and execute permission. For example, if <Rational
Agent Controller installation directory> is /opt/IBM/RAC, then you need read and execute permissions on each of the /opt, /opt/IBM, /opt/IBM/RAC and /opt/IBM/RAC/lib/ directories.
To give the correct permission on these directories by running
the command umask 022:
- In a UNIX System Services
shell, change to the <Rational Agent Controller installation
directory>/RACzOS31bit/bin directory.
- Run the following commands: umask 022
- Start agent controller: ./ACStart.sh.