Jinsight is
a JVM (Java Virtual Machine) profiler that's been available for some
time from IBM's alphaWorks
site. An important use of JVM profilers is with application servers.
Jinsight 2.1 provides usage instructions for profiling WebSphere
Application Server (WAS) 3.5. These instructions are updated for
use with WAS 4.0.
These instructions are specific to WAS 4.0 on WinNT/2K.
They have not been tested on AIX yet.
This will happen soon. In what follows <was> refers
to the WAS install directory while <jinsight> refers
to the Jinsight install directory.
Please send any corrections, omissions or other recommendations to
pglezen@us.ibm.com. The
present set of gaps I am looking to fill is:
profiling WAS 4.0 on AIX
WAS single server instructions - installing Jinsight EAR will be
different.
Installing Jinsight is simply a matter of unzipping it where ever
you wish to install it. The unzip process should create a
directory called jinsight2.1. This subdirectory will
be henceforth refered to as <jinsight>
Copy jinsightPA.dll from <jinsight> to
<was>/java/jre/bin.
With WebSphere 4.0, one cannot just casually drop a servlet into
an application server. It must be packaged as either a WAR or an
EAR file. Even if you choose to package it as a WAR file, you
must choose an application name anyway. So these steps create a
Jinsight EAR file right from the beginning with the WebSphere
Application Assembly Tool (AAT).
Start up the AAT
Create a new application by selecting File -> New ->
Application
Make sure the General tab of the EAR file is displayed.
Change the Display name: to jinsight.ear. Give
it any description you like.
Right click on Web Modules and select New.
Make sure the General tab of the web module is selected.
Fill in the following fields:
File name:jinsight.war
Context root:jinsight
Classpath:<jinsight>/jintrace.jar
This last field is important. Do not import the jintrace.jar file
into the AAT. It needs to be referenced inside its installation
directory because classes in jintrace.jar contain native methods.
Expand the Web Module. Right click WebComponents and
select New.
In the General tab fill in the following fields:
Component Name:jintrace
Display Name:Trace Control Servlet
Select Servlet for component type
Class name:com.ibm.jinsight.tracing.TraceControlServlet
Right click on Servlet Mapping and select New.
The Servlet entry field should already say
jintrace.
In the URL pattern entry field, enter
servlet/jintrace. Click ok.
The following instructions will install the Jinsight trace control
servlet into the default application server.
Right click on the Enterprise Applications folder of the
WebSphere admin GUI and select Install Enterprise Application.
Select the Install Application radial button and enter
path name of the Jinsight EAR file you just created in the
<was>/installableApps directory. Enter
jinsight for the application name.
Click Next until you reach the end of the wizard and then
click Finish.
Select the Default Server node in the righthand panel.
In the General tab click the Environment... button.
Add a property named JINSIGHT_TRACEFILE_NAME with value
set to the file name of the trace file that Jinsight will generate.
If this is not specified, Jinsight will place the trace in a file
called jinsight.trc in the application server's working
directory.
Go to the JVM Settings tab.
Click the Advanced JVM Settings button and add the following
to the Command line arguments: field:
-XrunjinsightPA
If there are already command line arguments, make sure a space
separates this addition from the other contents.
Note: Do not attempt to add a classpath entry here
or anywhere else in the JVM Settings tab as you might have
with WebSphere 3.5. In 4.0, this will cause the Jinsight servlet
to be loaded by a classloader that does not have access to other
J2EE classes (such as HTTPServlet). The proper classloader is
the application classloader. That is why jintrace.jar
is specified in the deployment descriptor of the Jinsight EAR file.
Stop and re-start the Default Server.
Regenerate the web server plugin. Right click on the node and
select Regen Webserver Plugin.
Obtaining the trace
This completes the setup. Remember that Jinsight trace data accumulates
very rapidly. You don't want to narrow the tracing window as much as
possible. The trace control servlet is accessed by loading
<jinsight>/jintrace.htm into a browser. Enter
hostname/jinsight
in the Server name: field replacing hostname with the
name of the WebSphere host. Jinsight trace commands are issued by
clicking the appropriate button and pressing the browsers back-button
in order to issue another command.
Version: $Revision: 1.1 $