Using a preloaded JVMTI agent
You must specify the preloaded JVMTI agent in a runtime parameter of the target Java™ job. The agent is loaded using the Java -agentpath: runtime parameter. Specify the full path name of either the 31-bit JVMTI agent (libCAZJTA11.so) or the 64-bit JVMTI agent (libCAZJTA14.so) depending on whether your target Java job is 31-bit or 64-bit.
The format of the -agentpath runtime parameter is:
–agentpath:/dir/agent=stcid,n
where:
- dir
- The path to the Application Performance Analyzer JVMTI agent.
- agent
- The name of the Application Performance Analyzer JVMTI agent you are preloading. Use libCAZJTA11.so for 31-bit. Use libCAZJTA14.so for 64-bit.
- stcid
- The Application Performance Analyzer started task Id. This is needed only when you have more than one Application Performance Analyzer started task operating on your system.
- n
- The number of minutes to wait for the Application Performance Analyzer started task to become active.
An example of how to specify a preloaded 64-bit JVMTI agent in
JCL that uses BPXBATCH to run the Java program prog follows.
The example assumes that the USS components of Application Performance Analyzer have
been installed in a directory named /usr/lpp/apa/v13r1,
and that there is only one Application Performance Analyzer started
task in the system.
//STEP EXEC PGM=BPXBATCH,
//PARM='sh java –agentpath:/usr/lpp/apa/v13r1/libCAZJTA14.so prog’
If there is more than one Application Performance Analyzer started
task in the system, the -agentpath: runtime parameter can specify
the system id of the started task. The following example shows how
to specify that the JVMTI agent is to be loaded for the started task
with a system id of CAZ1.
//STEP EXEC PGM=BPXBATCH,
//PARM='sh java –agentpath:/usr/lpp/apa/v13r1/libCAZJTA14.so=CAZ1 prog’
The JVMTI agent must locate the Application Performance Analyzer started
task. By default, it will timeout after 1 minute if the started task
is not found. This time limit can be overridden. The example that
follows shows how to specify a time limit of 9 minutes.
//STEP EXEC PGM=BPXBATCH,
//PARM='sh java –agentpath:/usr/lpp/apa/v13r1/libCAZJTA14.so=CAZ1,9 prog’