IDependOn-Set: 1
IDependOn-Set: 119
IDependOn-Set: 2
IDependOn-Set: 312
IDependOn-Set: 315
IDependOn-Set: 325
LastModifiedSecs: 938680512
Parent: 119
SequenceNumber: 7
Title: Running Apache JServ Under the OptimizeIt Profiling Tool
Part: 0
Author-Set: noel.mcnulty@bt.com
HideAttributions: 1
LastModifiedSecs: 938680512
Type: monospaced
Lines: 51
Here are the instructions I have prepared for running Apache JServ under the 
OptimizeIt Java profiling tool on Solaris. (These instructions assume you are 
using the JDK 1.1.*).

To profile our servlet code we have to:

a/ Start the Apache webserver _without_ automatically starting the Apache JServ
servlet engine.
b/ Start the OptimizeIt auditor, supplying the servlet engine start-up info as 
a parameter. The auditor will then run Apache JServ and our servlets, feeding 
the generated profiling information to a port on the machine (1470 by default).
c/ Start the OptimizeIt viewer GUI.
d/ Attach to the machine and port our profiling data is being served on (i.e. 
(machineName):1470).
e/ Start to execute the servlets via your web broswer(s) and view the profiling
output.

To do the above:

a/ Edit httpd.conf
   Change the directive ApJServManual to read 'on'.
   (As webserver user)
   Run 'apachectl start' to start Apache only.
b/ (As webserver user)
   Run 'jservstart.sh' (see below) to start Apache JServ running under 
   OptimizeIt.
   You should see this message:

       OptimizeIt 2.0 audit system. (c) 1997,1998 Intuitive Systems Inc.
       Port is 1470

c/ Open another xterm.
   Set your DISPLAY environmental variable correctly.
   Run the OptimizeIt start-up script supplied by Intuitive Systems.
   ('/export/home/OptimizeIt/Optimizeit')
d/ Select Program|Attach|(machineName):1470.


jservstart.sh
=============
#!/bin/sh
# Launch jserv in manual mode.
jserv=/export/home/apache/lib/Apache-JServ.jar
jsdk=/export/home/apache/lib/jsdk.jar
oracle=/export/home/apache/lib/classes111.zip
optit=/export/home/OptimizeIt/lib/optit.jar
props=/export/home/apache/config/jserv.properties
log=/export/home/apache/log/jserv.log
classes=$CLASSPATH:$jsdk:$jserv:$oracle:$optit
java -ms100M -mx300M -noclassgc -Djava.compiler=NONE -classpath $classes
intuitive.audit.Audit org.apache.jserv.JServ $props &> $log
EndPart: 0
