NonStop Server for Java 6.0 Programmer's Reference
6 Application Profiling
Application profiling and monitoring are supported through HPjmeter tool, which works in
combination with NSJ options, -Xeprof and -agentlib:hprof as explained in this chapter.
The NonStop Server for Java 6.0 supports the profiling of live Java applications. The HPjmeter
console is a GUI tool that runs on Java platforms that support GUI, such as HP-UX, Linux, and
Windows. It is used to perform the following profiling activities:
• “Monitoring live Java applications” (page 76)
• “Analyzing Garbage Collection Data” (page 79)
• “Collecting profile data for analysis” (page 76)
• “-Xeprof versus -agentlib:hprof (HPROF)” (page 79)
Monitoring live Java applications
The Java application must be prepared for live mode of profiling by running HPjmeter agents. The
HPjmeter agents are shipped on the NSJ 6.0 product CD as a new product T0866H31.
To set up monitoring for a live Java application:
1. Install the T0866H31 PAX file in the default installation directory: /usr/tandem/hpjmeter
2. Run a node agent:
a. export JMETER_HOME=/usr/tandem/hpjmeter/
b. $ JMETER_HOME/bin/nodeagent –port port_number
3. Launch the Java application using the HPjmeter JVM agent:
a. export _RLD_LIB_PATH=$JMETER_HOME/lib/oss/
b. export JAVA_HOME=/usr/tandem/java
c. java -agentlib:jmeter[=options] <application>
4. Start the HPjmeter console from a local installation on your client workstation (HP-UX, Windows,
or Linux). To download HPjmeter consoles for these platforms, visit http://www.hp.com/go/
hpjmeter.
5. Connect to the Node Agent from the Console.
NOTE:
• For information on monitoring capabilities and tips , see the HPjmeter 4.2 User's Guide
available at www.hp.com/go/hpjmeter.
• The instructions for using the HPjmeter tool on the NonStop platform are provided in “Addendum
to HPjmeter 4.2 User's Guide” (page 88).
Collecting profile data for analysis
There are three ways to collect application profile data for offline analysis using the HPjmeter
console:
1. The eprof profiler (start Java application with -Xeprof option).
2. Zero-preparation profiling (start and stop profile data collection by sending signal to the
running Java application—this uses the Xeprof profiler, internally, to profile the application
dynamically).
3. The HPROF profiler (start Java application -agentlib:hprof).
76 Application Profiling










