HPjmeter 4.3 User's Guide
To Take Advantage of Dynamic Attach:
Check that JM_JAVA_HOME in $JMETER_HOME/config/hpjmeter.conf is set to a Java 6
(6.0.03 or later) or a Java 7 directory to be able to later dynamically attach to a running JVM
from the HPjmeter console without first setting HPjmeter options on the command line.
When HPjmeter is installed on a system that has Java 6 or 7 installed in the usual location, the
installation procedure will automatically store the JDK location in hpjmeter.conf configuration
file. If the Java 6.x or 7.x JDK is installed in a non-standard location, or Java 6.x or 7.x is installed
after HPjmeter is installed, then it is necessary to update the hpjmeter.conf file manually. The
typical contents of the Java 6 or 7 files are JM_JAVA_HOME=/opt/java6 or
JM_JAVA_HOME=/opt/java7 respectively.
1. The HPjmeter installation process will configure JDKs that are installed in the standard location.
Some systems have JDKs installed in nonstandard locations, and some applications run with
an embedded Java Runtime Environment. In these situations, it is necessary to explicitly indicate
the location of HPjmeter libraries.
Assuming that JMETER_HOME represents your installation directory, modify the shared library
path in your environment as follows:
• On HP-UX running on HP Precision Architecture systems, add
$JMETER_HOME/lib/$ARCH to SHLIB_PATH where $ARCH is PA_RISC2.0 or
PA_RISC2.0W.
• On HP-UX running on Itanium-based systems with Java 5.x or later, add
$JMETER_HOME/lib/$ARCH to LD_LIBRARY_PATH where $ARCH is IA64N or
IA64W.
• On HP-UX running on Itanium-based systems, for JDK 1.4.x versions, use the SHLIB_PATH
environment variable to specify the shared library path.
2. On HP-UX and running Java 1.4.x, specify the Xbootclasspath in your java command:
$ java -Xbootclasspath/a:$JMETER_HOME/lib/agent.jar
$ ...
On Java 5.0 and later, -Xbootclasspath is optional.
3. Specify the HPjmeter switch in your java command:
On Java 5.0 and later:
$ java -agentlib:jmeter[=options] ...
On Java 1.4.x :
$ java -Xrunjmeter[:options] -Xbootclasspath/a:$JMETER_HOME/lib/agent.jar ...
NOTE: If you use the 64-bit version of the JVM (using the -d64 option), then you will need
to use the 64-bit version of the JVM agent. For example, type
$ java -d64 HelloWorld
when SHLIB_PATH is $JMETER_HOME/lib/$ARCH and
where $ARCH equals PA_RISC2.0W or IA64W.
See JVM Agent Options (page 27) for the list of available options and their descriptions.
Example Usage
• Using -agentlib on Java 5.x to run the JVM agent:
$ /opt/java1.5/bin/java -Xms256m -Xmx512m -agentlib:jmeter myapp
• Setting -Xbootclasspath and using -Xrunjmeter on Java 1.4 to run the JVM agent:
26 Completing Installation of HPjmeter