HP HPjmete User Manual

HPjmeter 4.2 User's Guide

HP Part Number: 5900-2022 Published: December 2011 Edition: 1
© Copyright 2005-2011 Hewlett-Packard Development Company, L.P.
Document Notice
The information in this document is subject to change without notice.
Hewlett-Packard makes no warranty of any kind with regard to this manual, including, but not limited to, the implied warranties of merchantability and fitness
damages in connection with the furnishing, performance, or use of this material.
Warranty
A copy of the specific warranty terms applicable to your Hewlett-Packard product and replacement parts can be obtained from your local Sales
and Service Office.
U.S. Government License
Proprietary computer software. Valid license fromHP required for possession, use or copying.Consistent with FAR 12.211 and 12.212,Commercial
Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under
vendor's standard commercial license.
You can find printable PDF versions of this user's guide and the release notes in the installation directory (doc subdirectory).
Copyright Notices
© Copyright 2005–2011 Hewlett-Packard Development Company, L.P. All rights reserved. Reproduction, adaptation, or translation of this
document without prior written permission is prohibited, except as allowed under copyright laws.
Trademark Notices
This product includes software developed by the Apache Software Foundation (http://www.apache.org/).
Intel and Itanium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries.
Microsoft and Windows are U.S. registered trademarks of Microsoft Corporation.
UNIX is a registered trademark of The Open Group.
Java™ and all Java based trademarks and logos are trademarks or registered trademarks of Oracle and/or its affiliates in the United States and
other countries.
HP-UX Release 11i and later (in both 32- and 64-bit configurations) are Open Group UNIX 95 branded products.

Table of Contents

About This Document.......................................................................................................10
Intended Audience................................................................................................................................10
Typographic Conventions.....................................................................................................................10
Additional HPjmeter Documents.........................................................................................................10
Related Information..............................................................................................................................10
Publishing History................................................................................................................................11
HP Encourages Your Comments..........................................................................................................11
1 Introducing HPjmeter 4.2.00.00 ...............................................................................12
Features.................................................................................................................................................12
Concepts................................................................................................................................................13
JVM Agent.......................................................................................................................................13
Node Agent.....................................................................................................................................13
2 Completing Installation of HPjmeter .........................................................................14
Platform Support and System Requirements.......................................................................................14
Agent Requirements........................................................................................................................14
Console Requirements.....................................................................................................................14
Completing the installation..................................................................................................................15
File Locations........................................................................................................................................15
Attaching to the JVM Agent of a Running Application.......................................................................15
Configuring your Application to Use HPjmeter Command Line Options..........................................15
Preparing to run Java.......................................................................................................................15
Example Usage...........................................................................................................................16
JVM Agent Options.........................................................................................................................17
Showing Version Information....................................................................................................17
Selecting Other JVM Agent Options..........................................................................................17
JVM Options Usage Examples...................................................................................................21
Security Awareness...............................................................................................................................21
Securing Communication Between the HPjmeter Node Agent and the Console...........................21
Ensuring the Integrity of HPjmeter Console/Node Agent Data Transfer..................................21
Protecting Data Confidentiality During HPjmeter Console/Node Agent Communication......21
Working with Firewalls .............................................................................................................21
Configuring User Access............................................................................................................22
Securing Communication Between the JVM and the HPjmeter Node Agent ................................22
3 Getting Started ............................................................................................................23
Are You Monitoring an Application or Analyzing Collected Data?....................................................23
Using HPjmeter to Monitor Applications.............................................................................................23
Configure and Start Your Application............................................................................................23
Confirm that the Node Agent is Running.......................................................................................23
Start the Console..............................................................................................................................23
Connect to the Node Agent from the Console................................................................................23
Set Session Preferences....................................................................................................................26
Changing Session Preferences During a Session.............................................................................29
View Monitoring Metrics During Your Open Session....................................................................29
Using HPjmeter to Analyze Profiling Data..........................................................................................29
Using HPjmeter to Analyze Garbage Collection Data.........................................................................31
Monitoring Demonstration Instructions...............................................................................................32
Memory Leak Applications.............................................................................................................33
Thread Deadlock Sample.................................................................................................................34
Table of Contents 3
4 Monitoring Applications ............................................................................................36
Controlling Data Collection and Display.............................................................................................36
Setting Data Collection Preferences......................................................................................................36
Managing Node Agents........................................................................................................................37
Managing Node Agents On HP-UX................................................................................................37
Running Node Agent as a Daemon...........................................................................................37
Verifying HP-UX Daemon is Running.......................................................................................37
Starting Node Agents Manually................................................................................................37
Stopping Node Agents...............................................................................................................38
Node Agent Access Restrictions......................................................................................................38
Running Multiple Node Agents......................................................................................................38
Saving Monitoring Metrics Information...............................................................................................38
Saving Data from the Console.........................................................................................................39
Naming Monitoring Data Files.............................................................................................................39
Diagnosing Errors When Monitoring Running Applications..............................................................39
Identifying Unexpected CPU Usage by Method.............................................................................39
Viewing the Application Load........................................................................................................40
Checking for Long Garbage Collection Pauses...............................................................................40
Checking for Application Paging Problems....................................................................................40
Identifying Excessive Calls to System.gc()......................................................................................41
Reviewing the Percentage of Time Spent in Garbage Collection....................................................41
Checking for Proper Heap Sizing....................................................................................................43
Confirming Java Memory Leaks......................................................................................................43
Determining the Severity of a Memory Leak..................................................................................43
Identifying Excessive Object Allocation..........................................................................................44
Identifying the Site of Excessive Object Allocation.........................................................................44
Identifying Abnormal Thread Termination....................................................................................44
Identifying Multiple Short-lived Threads.......................................................................................44
Identifying Excessive Lock Contention...........................................................................................45
Identifying Deadlocked Threads.....................................................................................................45
Identifying Excessive Thread Creation...........................................................................................45
Identifying Excessive Method Compilation....................................................................................46
Identifying Too Many Classes Loaded............................................................................................47
Using the JMX Viewer...........................................................................................................................47
Understanding the JMX Summary View.........................................................................................48
JMX Summary Tab.....................................................................................................................48
JMX Memory Tab.......................................................................................................................49
JMX Threads Tab........................................................................................................................51
JMX Runtime Tab.......................................................................................................................52
JMX Notifications Tab................................................................................................................52
Changing Mbean Values and Monitoring the Result......................................................................52
Using the Functions in the JMX Server View..................................................................................53
The MBean Filter........................................................................................................................53
The MBean Attribute Tab...........................................................................................................54
The MBean Operations Tab........................................................................................................55
The MBean Notifications Tab.....................................................................................................56
The MBean Information Tab......................................................................................................56
5 Profiling Applications .................................................................................................58
Profiling Overview................................................................................................................................58
Tracing.............................................................................................................................................59
Sampling..........................................................................................................................................59
Tuning Performance........................................................................................................................59
Preparing a Benchmark........................................................................................................................60
Collecting Profile Data..........................................................................................................................61
4 Table of Contents
Profiling with -Xeprof......................................................................................................................61
Profiling with Zero Preparation......................................................................................................62
Profiling with -agentlib:hprof..........................................................................................................63
Naming Profile Data Files...............................................................................................................65
–Xeprof and –agentlib:hprof Profiling Options and Their Corresponding Metrics.............................65
Approaches to Analyzing Performance Data.......................................................................................68
Looking at the Data from the Bottom Up........................................................................................68
Looking at the Data from the Top Down........................................................................................68
Looking for Inefficiencies in Memory Usage..................................................................................68
Considerations in Interpreting the Data...............................................................................................68
Inclusive Versus Exclusive Time.....................................................................................................69
Time Units.......................................................................................................................................69
CPU Versus Clock Time.............................................................................................................69
Locating Summary Information for Saved Data Sets...........................................................................69
Adjusting Scope....................................................................................................................................70
Comparing Profiling Data Files ...........................................................................................................71
Scaling Comparison Data.....................................................................................................................72
Reading Profiling Histograms..............................................................................................................73
Key to Thread States Reported by ..................................................................................................73
Interpreting the Histogram Presentation........................................................................................74
Using Call Graph Trees.........................................................................................................................75
Interpreting Call Graph Data..........................................................................................................75
Example of Node Color Display................................................................................................76
Options for Manipulating the Call Tree Display.............................................................................77
Tree Pruning...............................................................................................................................77
Auto-Expanding the Call Tree...................................................................................................77
Using Sub-Trees..........................................................................................................................77
Searching the Trees.....................................................................................................................78
Using Heuristics to Locate Possible Hot Spots.....................................................................................78
6 Analyzing Garbage Collection Data .......................................................................80
Obtaining Garbage Collection Data......................................................................................................80
Data Collection with -Xverbosegc...................................................................................................80
Collecting Allocation Site Statistics for Viewing in HPjmeter...................................................83
Collecting Glance Data for Viewing in HPjmeter......................................................................83
Collecting GC Data with Zero Preparation.....................................................................................83
Data Collection with -Xloggc...........................................................................................................84
Naming GC Data Files.....................................................................................................................85
-Xverbosegc and -Xloggc Options and Their Corresponding Metrics.................................................85
Locating Summary Information for Saved Data Sets...........................................................................86
Comparing Garbage Collection Data Files ..........................................................................................86
Basic Garbage Collection Concepts......................................................................................................87
Key to Garbage Collection Types Recognized by HPjmeter...........................................................87
Understanding the Summary Presentation of GC Data..................................................................88
Understanding the System Details Captured with GC Data..........................................................90
7 Using the Console .......................................................................................................93
Starting the Console..............................................................................................................................93
Starting the Console On HP-UX......................................................................................................93
Starting the Console On Linux........................................................................................................93
Starting the Console On Microsoft Windows..................................................................................93
Using the Main Window Functions......................................................................................................93
Data Representation........................................................................................................................94
Icons and Their Meaning.................................................................................................................95
Node Agent................................................................................................................................95
JVM Agent..................................................................................................................................95
Table of Contents 5
Open and Cached Sessions........................................................................................................96
Time Slice Entries.......................................................................................................................96
Saving Data................................................................................................................................96
Console Tool Bar Buttons................................................................................................................97
Console Menu Choices....................................................................................................................97
The Monitor Menu.....................................................................................................................98
Console Guide.................................................................................................................................99
Status Bar.......................................................................................................................................100
Setting Monitoring Session Preferences .............................................................................................100
Specifying Metrics to Collect for Monitoring................................................................................100
Enabling Monitoring Alerts...........................................................................................................101
Specifying Filters for Monitoring .................................................................................................102
Editing Filters...........................................................................................................................102
Adding Filters...........................................................................................................................102
Specifying Filter Sets................................................................................................................103
Viewing Monitoring Data in HPjmeter...............................................................................................103
Using Alerts........................................................................................................................................103
Using the Alert Controller.............................................................................................................105
Viewing a Log of the Alert History..........................................................................................107
Editing E-mail Notification Attributes..........................................................................................107
Responding to Alerts.....................................................................................................................108
Abnormal Thread Termination Alert.......................................................................................108
Uncaught Exception Statistics.............................................................................................109
Excessive Compilation Alert....................................................................................................110
Expected Out Of Memory Error Alert......................................................................................110
GC Duration Notification.........................................................................................................110
Heap Usage Notification..........................................................................................................111
Java Collection Leak Locations Alert.......................................................................................111
Array Leak Locations Alert......................................................................................................112
Process CPU Usage Alert.........................................................................................................113
System CPU Usage Alert..........................................................................................................114
Thread Deadlock Alert.............................................................................................................115
Unfinalized Queue Growth......................................................................................................115
8 Using Visualizer Functions .......................................................................................116
Visualizer Behavior When Monitoring Behavior or Analyzing Data.................................................116
Locating Information About a JVM and its Environment..................................................................117
Using Monitoring Displays.................................................................................................................117
Monitor Code and/or CPU Activity Menu....................................................................................118
Java Method HotSpots..............................................................................................................118
Guidelines...........................................................................................................................119
Details..................................................................................................................................119
Thrown Exceptions...................................................................................................................120
Thrown Exceptions with Stack Traces......................................................................................120
Monitor Memory and/or Heap Activity Menu.............................................................................122
Heap Monitor...........................................................................................................................122
Guidelines...........................................................................................................................122
Details..................................................................................................................................123
Garbage Collections..................................................................................................................123
Guidelines...........................................................................................................................124
Details..................................................................................................................................124
GC Duration.............................................................................................................................124
Guidelines...........................................................................................................................124
Details..................................................................................................................................125
Percentage of Time Spent in Garbage Collection.....................................................................125
6 Table of Contents
Guidelines...........................................................................................................................125
Details..................................................................................................................................125
Unfinalized Objects..................................................................................................................126
Guidelines...........................................................................................................................126
Details..................................................................................................................................126
Allocated Object Statistics by Class..........................................................................................127
Guidelines...........................................................................................................................127
Details..................................................................................................................................127
Allocating Method Statistics.....................................................................................................128
Guidelines...........................................................................................................................128
Details..................................................................................................................................128
Current Live Heap Objects.......................................................................................................129
Details..................................................................................................................................130
Monitor Threads and/or Locks Menu............................................................................................131
Thread Histogram....................................................................................................................131
Guidelines...........................................................................................................................132
Details..................................................................................................................................132
Lock Contention.......................................................................................................................133
Guidelines...........................................................................................................................133
Details..................................................................................................................................133
Monitor JVM and/or System Activity Menu.................................................................................134
Method Compilation Count.....................................................................................................134
Guidelines...........................................................................................................................134
Method Compilation Frequency..............................................................................................135
Guidelines...........................................................................................................................135
Loaded Classes.........................................................................................................................135
Guidelines...........................................................................................................................135
Percent (%) CPU Utilization.....................................................................................................136
Guidelines...........................................................................................................................136
Viewing Profiling or GC Data in HPjmeter........................................................................................137
Using Profile Displays.........................................................................................................................137
Menu Choices................................................................................................................................140
Profile Code and/or CPU Activity.................................................................................................140
Method Call Count...................................................................................................................140
Exclusive Method Times (CPU)...............................................................................................141
Exclusive Method Clock Times................................................................................................141
Call Graph Tree with Call Count..............................................................................................141
Call Graph Tree with CPU........................................................................................................142
Call Graph Tree with Clock Time.............................................................................................142
Inclusive Method CPU Times...................................................................................................142
Inclusive Method Clock Times.................................................................................................142
Average Exclusive Method CPU Times*..................................................................................142
Average Exclusive Method Clock Times*................................................................................143
Average Inclusive Method CPU Times*...................................................................................143
Average Inclusive Method Clock Times*.................................................................................143
Starvation by Method*..............................................................................................................143
Starvation Ratio*.......................................................................................................................144
Methods with Loops*...............................................................................................................144
Exclusive Class CPU Times*.....................................................................................................144
Exclusive Class Clock Times*...................................................................................................144
Profile Memory and/or Heap Activity..........................................................................................144
Objects Created by Method......................................................................................................145
Created Objects (Count)...........................................................................................................145
Created Objects (Bytes)............................................................................................................145
Live Objects (Count).................................................................................................................145
Table of Contents 7
Live Objects (Bytes)..................................................................................................................145
Live Array Sizes........................................................................................................................145
Unfinalized Objects..................................................................................................................146
Reference Graph Tree...............................................................................................................146
Reference Sub-Trees by Size.....................................................................................................146
Object and Primitive Value Tables......................................................................................147
Related Topics.....................................................................................................................149
Class Loaders............................................................................................................................150
Guidelines...........................................................................................................................151
Residual Objects (Count)..........................................................................................................152
Residual Objects (Bytes)...........................................................................................................152
Profile by Threads..........................................................................................................................152
Threads Histogram...................................................................................................................152
Thread Groups Histogram.......................................................................................................153
Profile by Locks.............................................................................................................................153
Contested Lock Claims by Method..........................................................................................154
All Lock Claims by Method.....................................................................................................154
Lock Delay - Method Exclusive................................................................................................154
Lock Delay - Call Graph Tree...................................................................................................154
Lock Delay - Method Inclusive................................................................................................155
Lock Contention Ratio by Method*..........................................................................................155
Average Exclusive Method Lock Delay*..................................................................................155
Exclusive Method Lock Delay / Clock Time*...........................................................................155
Average Inclusive Method Lock Delay*...................................................................................155
Inclusive Method Lock Delay / Clock Time*............................................................................155
Exclusive Class Lock Delay*.....................................................................................................156
Using Heuristic Metrics from the Estimate Menu.........................................................................156
Inline Candidates.....................................................................................................................156
Exceptions Thrown...................................................................................................................156
Memory Leaks..........................................................................................................................156
Using Specialized Garbage Collection Displays.................................................................................157
Heap Usage After GC....................................................................................................................157
Duration (Stop the World).............................................................................................................158
Cumulative Allocation...................................................................................................................159
Creation Rate.................................................................................................................................160
Allocation Site Statistics.................................................................................................................161
How a Snapshot of Allocation Sites Statistics is Shown in GC Visualizers.............................166
User-Defined X-Y Axes..................................................................................................................167
Multiple User-Defined...................................................................................................................168
Glance Data....................................................................................................................................170
Glance System Call Data................................................................................................................174
Using Visualizer Tool Bars..................................................................................................................176
Common Tool Bar Buttons.............................................................................................................176
Tool Bar Buttons for Manipulating Tabular Data..........................................................................177
Tool Bar Buttons for Manipulating Graphical Data......................................................................177
Tool Bar Buttons for Manipulating Garbage Collection Data..................................................177
Special Button or Other Gadget Functions....................................................................................178
Mark an Item for Search...........................................................................................................178
Using the Marked Object List on the Console....................................................................179
Find a Search Pattern................................................................................................................179
Editing the Finder...............................................................................................................181
Pause or Resume Graphical Time-based Scrolling...................................................................181
Changing Time Interval in GC Data Visualizers......................................................................181
Select a Subset of the Available Data..................................................................................181
Apply Selected Interval Across All Metrics........................................................................183
8 Table of Contents
Reset Interval to Default Settings Across All Metrics.........................................................184
Changing Time Interval in Monitoring Visualizers.................................................................184
Change Color Selection for Histogram Display..................................................................................185
9 Understanding How HPjmeter Works ....................................................................187
Performance Overhead on Running Applications..............................................................................187
Application Server Startup Time...................................................................................................187
Monitoring Overhead....................................................................................................................187
Changes in Memory Overhead With Dynamic Attach............................................................187
Profiling Overhead and Intrusion.................................................................................................187
Node Agent Overhead...................................................................................................................187
Console Overhead..........................................................................................................................188
Data Sampling Considerations...........................................................................................................188
Using Confidence Interval to Indicate Sample Validity................................................................188
How Memory Leak Detection Works.................................................................................................189
Tapping in to Standard Management of the Java Virtual Machine....................................................190
10 Troubleshooting ......................................................................................................192
Documentation and Support..............................................................................................................192
Identifying Version Numbers.............................................................................................................192
Installation...........................................................................................................................................192
Console ...............................................................................................................................................193
JVM agent............................................................................................................................................194
Node agent..........................................................................................................................................195
Zero Preparation Profiling..................................................................................................................195
Unexpected Behavior in Visualizers...................................................................................................196
A Quick References.......................................................................................................197
Connecting to the HPjmeter Node Agent...........................................................................................197
Determining Which HPjmeter Features Are Available With a Specific JVM Version........................197
Default Location of Xverbosegc and Allocation Site Statistics Data Files..........................................198
Glossary ........................................................................................................................199
Index...............................................................................................................................202
Table of Contents 9

About This Document

This document provides updated information about product features, known problems, and workarounds for the 4.2 release of HPjmeter.

Intended Audience

This document is intended for application administrators and software developers responsible for monitoring Java application performance and operation on HP-UX. Users are expected to have some knowledge of concepts and/or commands for the HP-UX operating system, usage of the Java Virtual Machine on HP-UX, and Java application performance. When running the HPjmeter console on a Microsoft® Windows® platform, the user is expected to be familiar with installing executables and navigating the Windows file system.

Typographic Conventions

This document uses the following typographical conventions. audit(5) A man page. The man page name is audit, and it is located in Section 5.
Command
ComputerOut
ENVIRONVAR The name of an environment variable, for example, PATH.
[ERRORNAME]
A command name or qualified command phrase.
Text displayed by the computer.
The name of an error, usually returned in the errno variable.
Key The name of a keyboard key. Return and Enter both refer to the same key.
UserInput
Variable
... The preceding element can be repeated an arbitrary number of times. A vertical
| Separates items in a list of choices.
Commands and other text that you type.
The name of a placeholder in a command, function, or other syntax display that you replace with an actual value.
ellipsis indicates the continuation of a code example.

Additional HPjmeter Documents

HPjmeter 4.2.00.00 Release Notes and Installation Guide: http://www.hp.com/go/
hpux-hpjmeter-docs.
HPjmeter overview and access to software: https://h20392.www2.hp.com/portal/swdepot/
displayProductInfo.do?productNumber=HPJMETER .

Related Information

JSR 174: Monitoring and Management Specification for the Java™ Virtual Machine at Java Community Process web site: http://www.jcp.org/en/jsr/detail?id=174
Java™ Troubleshooting Guide for HP-UX Systems: http://www.hp.com/go/hpux-java-docs
Patch Information for Java on HP-UX: http://ftp.hp.com/pub/softlib/hpuxjava-patchinfo/
index.html
HP-UX Secure Shell Getting Started Guide: http://www.hp.com/go/hpux-security-docs
HP-UX System Administrator's Guide: Security Management, “Securing Remote Sessions Using HP-UX Secure Shell” : http://www.hp.com/go/hpux-core-docs-11iv3
Memory Management in the Java HotSpot™ Virtual Machine (Sun Developer Network): http://
java.sun.com/j2se/reference/whitepapers/memorymanagement_whitepaper.pdf

Publishing History

The document publication date and part number indicate this document's current edition. The publication date changes when a new edition is printed. Document updates may be issued between editions to correct errors or document product changes. To ensure that you receive the updated or new editions, subscribe to the appropriate product support service. See your HP sales representative for details. You can find the latest version of this document on the HP Business Support Center at http://www.hp.com/go/hpux-hpjmeter-docs.
Publication DateEdition NumberSoftware Version NumberHP Part Number
December 201114.2.00.005900-2022
September 201014.1.00.005900-1025
May 200914.0.00.005992-5899
June 200813.1.0.005992-0757
November 200613.0.0.005991-6757
September 200622.15991-6686
July 200612.15991-5846
February 200612.05991-5437

HP Encourages Your Comments

We encourage your comments concerning this document. We are committed to providing documentation that meets your needs.
Please send your comments via the Customer Feedback web page: http://www.hp.com/bizsupport/
feedback/ww/webfeedback.html. Include the document title, HP part number, and any comment,
error found, or suggestion for improvement you have concerning this document. Also, please let us know what we did right so we can incorporate it into other documents.

1 Introducing HPjmeter 4.2.00.00

HPjmeter is a performance analysis tool for deployed Java applications. It will help you identify performance problems in your production environment as well as during development.
NOTE: You cannot use HPjmeter to monitor Java applets in a production environment.
HPjmeter helps you diagnose many types of Java application problems that occur only after a product is deployed. The types of problems you can identify include:
Memory-retention problems
Performance bottlenecks in Java code
Improper JVM heap settings
Certain application logic errors, such as deadlocks
Ineffective or problematic garbage collection These problems may not be apparent or reproducible before you deploy your application because
they depend on unique conditions present only in deployment.
With HPjmeter you can also gain a comprehensive overview of certain states of a running JVM and running applications, including details on memory usage, garbage collection, runtime, and class loading, for example. Using HPjmeter's ability to interact with the Java Management Extensions (JMX) component in the JVM, you can also manipulate operations during a monitoring session to control the state of some logging mechanisms, to gather snapshots of stack traces and memory details, and to force a garbage collection.

Features

With its application and JVM metrics, HPjmeter helps close the loop between developers and operations staff.
HPjmeter has two modes of operation: you can use it to monitor live applications, and you can analyze data collected from applications that have been run using profiling or garbage collection options.
Specifically, HPjmeter provides these monitoring capabilities:
Dynamic display of heap size and live objects in the heap
Dynamic display of garbage collection events and percentage time spent ingarbage collection
Memory leak detection alerts with leak rate
Java Method HotSpots, which represent CPU usage per method
Thread views displaying thread states over time
Object allocation percentage by method and by object type
Method compilation count in the JVM dynamic compiler
Number of classes loaded by the JVM over time
Thrown exception statistics
Thread deadlock detection
Visibility into standard MBean attributes, operations, and notifications (JSR 174) within the
Visibility into user-defined MBeans, with the ability to modify attributes and trigger
Multi-application, multi-node monitoring from a single console
HPjmeter provides these profiling capabilities:
Graphic display of profiling data
Heuristics on inlining, thrown exceptions, and memory leaks
Java Virtual Machine, with the ability to trigger operations from HPjmeter and enable or disable notifications.
operations in real time, then monitor the resulting application behavior.
12 Introducing HPjmeter 4.2.00.00
Interactive call graph with call count, or with CPU or clock time, if available
Per thread, per thread group, or per process display
Allocated and residual objects with object reference graph
Comparison capability for performance improvement tracking
HPjmeter provides these metrics for garbage collection (GC) analysis:
Details and graphical display of object creation rate, changes in cumulative memory allocation
Detailed summaries of GC activity and system resource allocation, along with other system
HPjmeter also provides these notification functions:
Set notification thresholds for abnormal thread termination, excessive compilation, expected
Set notification thresholds for levels of heap usage, process CPU, and system CPU.
Enable or disable notifications.
Change notification thresholds in real time to efficiently monitor targeted events

Concepts

HPjmeter contains these major components:
The console – the primary control window where monitoring sessions are initiated and
The monitoring agent – represents HPjmeter on each managed node. The agent has two
and in heap usage as related to GC events and types, and duration of GC events in the recorded time period.
and JVM runtime and version data.
out-of-memory error, and memory leak rates.
controlled and where data files are opened and listed for access. The console presents data in viewing windows that contain controls and functions specific to the data type and the activity of the user.
subcomponents: — The JVM agent: Each running JVM has an associated JVM agent that collects data and
sends it to a node agent, which sends it to the console.
The HPjmeter node agent: Each managed node has a node agent that communicates
between the console and JVM agents.

JVM Agent

The JVM agent uses standard Java profiling interfaces (JVMTI and JVMPI) and a standard monitoring and management interface (JSR174) to collect data from a running application and to provide metrics to help detect and fix problems in that deployed application.
The JVM agent shares a process with a running JVM and forwards data through the node agent to a console. Multiple consoles can connect to each of the multiple node agents on a managed node. However, only one console and node agent can maintain an active session with a specific JVM agent at any given time.

Node Agent

Node agents manage communication between JVM agents and consoles. The preferred way of using node agents is to start the node agent as a daemon as root on each managed node.
Related Topics
Managing Node Agents On HP-UX (page 37)
Concepts 13

2 Completing Installation of HPjmeter

NOTE: This chapter assumes that you have installed the HPjmeter components on the appropriate server(s) and are ready to configure the agents. For information on initial installation, see HPjmeter Release Notes and Installation Guide.

Platform Support and System Requirements

Although the agents and console can execute on the same system, this document assumes they are installed on separate systems—the recommended configuration.

Agent Requirements

These are the requirements for systems running JVM agents and node agents.
Table 2-1 Agent Requirements
HP-UX on HP 9000 PA-RISC serversOperating system and
architecture
11.11 (11i v1),
11.23 (11i v2),
11.31 (11i v3)
HP-UX on Itanium®-based HP Integrity servers
11.23 (11i v2),
11.31 (11i v3)
Java • HP 1.4.2.02 or later 1.4.x, 5.x and 6.x versions on PA 2.0 for HP-UX (HP 9000
Patches and updates
Processor and memory
Zero Preparation Data Collection:
If you are running the HP JDK/JRE 5.0.04 or later, you can send a signal to the running JVM to start and stop an eprof profiling data collection period with zero preparation and no interruption of your application. See Profiling with Zero Preparation (page 62).
If you are running the HP JDK/JRE 5.0.14 (or later) or the 6.0.02 version (or later), you can send a signal to the running JVM to start and stop a verbose GC data collection period with zero preparation and no interruption of your application. See Collecting GC Data with Zero Preparation
(page 83).

Console Requirements

PA-RISC) 11.11 (11i v1) and 11.23 (11i v2), 11.31 (11i v3)
• HP 1.4.2.02 or later 1.4.x , 5.x , 6.x, and 7.x versions on HP-UX (HP Integrity)
11.23 (11i v2), 11.31 (11i v3)
HPjconfig canhelp you determine which Java patches are recommended or required
for best operation of the HPjmeter agent on HP-UX.
The agent is designed to be lightweight and low overhead, and does not require any additionalprocessing power or memory beyond that requiredby the application being monitored.
10 MBDisk space
These are the requirements for systems running the console.
Table 2-2 Console Requirements
Operating system and architecture
14 Completing Installation of HPjmeter
The console is a pure Java application, so it should execute on any platform that supports Java.
Java 5.x, Java 6.x, and 7.x versions.Java
Table 2-2 Console Requirements (continued)
Patches and updates
Processor and memory • Minimum 500 MHz processor is recommended.

Completing the installation

After installation, the HPjmeter console is available as a standalone tool or through Java Web Start from a server of your choice, such as the HP Systems Insight Manager central management server.
To complete installation, you need to configure the HPjmeter JVM agent by modifying the command line for each application for which you want to monitor or collect data. Then you need to start the HPjmeter node agent. The following sections will help you complete the installation.
Platform Support and System Requirements (page 14)
File Locations (page 15)
Configuring your Application to Use HPjmeter Command Line Options (page 15)
Working with Firewalls (page 21)
For additional information on agents: Managing Node Agents (page 37)

File Locations

HPjconfig canhelp you determine which Java patches are recommended or required
for best operation of the HPjmeter agent on HP-UX.
• Minimum 256 MB memory is required.
10 MBDisk space
The default installation paths by operating system are as follow:
On HP-UX and Linux: /opt/hpjmeter
On Microsoft® Windows: C:\Program Files\HPjmeter

Attaching to the JVM Agent of a Running Application

For applications running with Java 6.0.03 or later, HPjmeter 4.2.00.00 can automatically identify the JVMs running on the server and display them symbolically in the console for attachment and monitoring. This includes JVMs for which no HPjmeter switches were used in the java command that started the applications. With few exceptions (discussed elsewhere in this guide), HPjmeter monitoring functionality is the same whetherthe JVM agent is loaded from the console (through dynamic attachment) or from the command line when starting the application.

Configuring your Application to Use HPjmeter Command Line Options

For most supported versions of Java, it is still necessary to start the application using HPjmeter options on the java command and to modify two environment variables. Or, you may want to use command line options to control the bytecode instrumentation.

Preparing to run Java

For most installations, linkage to the appropriate libraries is completed automatically as part of the installation process. Go to step 2 if you have a standard installation of the Java Runtime Environment.
Completing the installation 15
To Take Advantage of Dynamic Attach:
Check that JM_JAVA_HOME in $JMETER_HOME/config/hpjmeter.conf is set to a Java 6 directory (6.0.03 or later) 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 installed in the usual location, the installation procedurewill automatically store the JDK location in hpjmeter.conf configuration file. If the Java 6.x JDK is installed in a non-standard location, or Java 6.x is installed after HPjmeter is installed, then it is necessary to update the hpjmeter.conf file manually. The typical contents of the file are:
JM_JAVA_HOME=/opt/java6
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 17) 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:
16 Completing Installation of HPjmeter
$ /opt/java1.4/bin/java -Xms256m -Xmx512m
-Xbootclasspath/a:/opt/hpjmeter/lib/agent.jar -Xrunjmeter myapp
NOTE:
With the addition of JVMTI in JDK 5.0, you should use the -agentlib switch to take advantage of improvements in JDK 5.0 and reduce the impact of data sampling on application performance. While -Xrunjmeter can still be used to specify the JVM agent with Java 5 versions, the impact on application performance is significantly greater than when using
-agentlib.
Starting with Java 5.0, -agentlib is the standard way to specify the JVM agent. Therefore, this document will refer primarily to -agentlib.
Using an alternate HPjmeter library to work with applications that are run with the –V2
option on PA systems:
$ /opt/java1.5/bin/java -V2 –agentlib:jmeter_v2 myapp

JVM Agent Options

This section provides the list of options for changing the JVM agent behavior and determining the Java version running on the system.
Showing Version Information
To show the version information, use
-agentlib:jmeter=version
OR
-Xrunjmeter:version
Selecting Other JVM Agent Options
Add other options using this syntax
-agentlib:jmeter[[=version]|[=option[[,option]]...]]
OR
-Xrunjmeter[:[version]|[option[[,option]]...]]
where option may be any of these:
appserver_port=port
Associates a port number with a JVM process when it is displayed in the console. This port number is unrelated to the port number used by the node agent, and so it is also unrelated to the optional port number that can be specified in the console when attaching to a managed node.
It does not affect any communication, and is only part of the user interface. The
appserver_port= usually corresponds to the port to which the application server listens.
Example usage: -agentlib:jmeter=appserver_port=7001
group_private
Specifies that the JVM will be visible only to node agents run with the same group-id; that is, run by the user belonging to the same group, as the one who runs the JVM. This limitation does not apply to node agents run as root (the installation default). This is the default behavior on HP-UX systems.
You can specify only one of the options owner_private, group_private or public.
Example usage: -agentlib:jmeter=group_private
Configuring your Application to Use HPjmeter Command Line Options 17
include=filter1[:filter2]..., exclude=filter1[:filter2]...
Creates a colon-separated list of classes to specify which classes or packages are instrumented. Method-level filtering is not supported.
If a class is not instrumented, the JVM agent metrics that use bytecode instrumentation (BCI) do not provide any output related to the class methods. To see the list of filters in
effect while the data was collected, including default agent filters, click the icon when you see it in the console.
Class filtering minimizes the overhead and focuses attention on user-produced code.
By default, the JVM agent instruments bytecode of all loaded classes to implement some of the metrics, except those classes that belong to one of these:
Application servers, for performance reasons. — HPjmeter management tools, in order to focus on user-created code. — A set of implementation-dependent classes that HPjmeter cannot instrument. These
cannot be overridden.
Some metrics display results for all classes regardless of filters, because class filters apply only to those metrics that use bytecode instrumentation.
NOTE: JVM agent filters are distinct from console monitoring filters. For more information, see Setting Monitoring Session Preferences (page 100).
JVM agent filters are configured when you start the JVM, and cannot be dynamically
changed.
Console filters are configured when you open a session with a JVM agent, and can be
changed from session to session. With HPjmeter 4.0 and later, these filters can also be changed during a session.
If the JVM agent has filtered out a class, the console will be unable to see metrics from that class even if you try to remove the console filter for the class.
HPjmeter always excludes these packages:
$Proxy
com.ibm.misc. com.ibm.jvm.
com.hp.jmeter.jvmagent. com.hp.jmeter.share.jmx. com.hp.jmeter.asm.
The default filters also exclude the following packages. However, you can use the
include option to override the default behavior:
COM.rsa.com.jrockit. COM.jrockit.
jrockit.
org.jboss org.jbossmq.
com.sun. java. javax. sun. sunw.io. sunw.util.
org.omg.org.ietf.org.apache.
com.hp.ov.org.xml.org.w3c.
weblogic. com.bea. com.beasys.p0. p1.i2.
org.hsql.org.enhydra.com.ibm. com.tivoli.
com.netscape.server.http.com.iplanet.EDU.oswego.
oracle.com.orionserver.com.evermind.
18 Completing Installation of HPjmeter
The default filters always include the following packages. They cannot be overriden with an exclude option:
sun.jdbc.odbc.
weblogic.jdbc.informix4. weblogic.jdbc.mssqlserver4. weblogic.jdbc.oci. weblogic.jdbc.rowset. com.bea.p13n. com.bea.netuix.
org.apache.jsp. org.apache.jasper.
com.bea.medrec.oracle.evermind.sql.oracle.jdbc. oracle.sql.
com.sun.ebank.com.sun.j2ee.blueprints.com.ibm.samples.
You can change the default behavior by using the include option. For example:
-agentlib:jmeter=include=com.ibm.ws,exclude=com.ibm.ws.io
This effect is similar to the previous example, except that the classes belonging to the com.ibm.ws.io package, and its sub-packages if any, will be excluded from the instrumentation. Otherclasses belonging to the com.ibm.ws package or its sub-packages other than io will be instrumented. Classes belonging to sub-packages other than ws of the com.ibm package will be still excluded by the default rule.
In general, you can specify multiple package or class names with the include or exclude option. The behavior with respect to any loaded class will be as defined by the most specific rule (filter) that applies to the fully qualified class name.
An include filter rule will override an exclude filter rule when the same package name is provided on both options, even if one of the options is an implicit default. For example:
-agentlib:jmeter=exclude=sun.jdbc.odbc:other-package-names
In this example, the sun.jdbc.odbc package is not excluded because the implicit default include of this package overrides the explicit exclude.
logging=FINEST|FINER|FINE|CONFIG|INFO|WARNING|SEVERE|OFF
Sets a log level for the JVM agent, which allows you to collect varying amounts of information about the node agent and JVM agent. Available log levels in order of impact on performance are:
FINEST (Most impact on performance) FINER FINE CONFIG INFO WARNING (Default setting) SEVERE (Least impact on performance) OFF (Turn off logging)
monitor_batch[:file=filename]
Enables all metrics and sends the collected data to a file. The default name for the file is javapid.hpjmeter. Use the optional monitor_batch:file=your_file_name to override the default.
Once data has been collected and saved to a file on the managed node, you can view the file from the console using the Open File button or using drag and drop. You may need to copy the file to a file system visible from the console. For more information, see Saving
Monitoring Metrics Information (page 38).
Example usage: — To use default file name:
-agentlib:jmeter=monitor_batch
To specify a file name:
-agentlib:jmeter=monitor_batch:file=mysaveddata.hpjmeter
Configuring your Application to Use HPjmeter Command Line Options 19
noalloc
Reduces dormant overhead by skipping bytecode instrumentation that applies to object allocation metrics: Allocated Object Statistics by Class and Allocating Method Statistics. The noalloc option makes those metrics unavailable.
Example usage: -agentlib:jmeter=noalloc
nohotspots
Reduces dormant overhead by skipping the bytecode instrumentation that supports Java Method HotSpots. Any console connecting to an application initially started with this agent flag does not enable Java Method HotSpots, and this metric is not listed in the Session Preferences dialog.
Example usage: -agentlib:jmeter=nohotspots
noexception
Reduces dormant overhead by skipping bytecode instrumentation that applies to the Thrown Exception metrics. Any console connecting to an application initially started with this attribute does not enable Thrown Exception metrics, and these metrics are not listed in the Session Preferences dialog.
Example usage: -agentlib:jmeter=noexception
nomemleak
Reduces dormant overhead by skipping bytecode instrumentation that applies to memory leak location events. When you specify this option, the memory leak location alert is unavailable in the console for the lifetime of this application.
Example usage: -agentlib:jmeter=nomemleak
noarrayleak
Reduces dormant overhead by skipping bytecode instrumentation that applies to array leak location events. When you specify this option, the array leak location alert is unavailable in the console for the lifetime of this application.
Example usage: -agentlib:jmeter=noarrayleak
owner_private
Specifies that the JVM is visible only to the node agents run with the same effective user ID; that is, run by the same user as the one who runs the JVM. This limitation does not apply to node agents run as root (the installation default).
You can specify only one of the options owner_private, group_private, or public.
Example usage: -agentlib:jmeter=owner_private
public
Specifies that the JVM is visible to all node agents run on the same host as the JVM.
You can specify only one of the options owner_private, group_private, or public.
Example usage: -agentlib:jmeter=public
verbose[:file=filename]
Prints information about the bytecode instrumentation rules in effect, such as include or exclude settings, and about the individual instrumentation decisions made for all loaded
classes. By default, the information is printed on stdout. You can overridethis by specifying a file name, for example verbose:file=bci.txt.
Example usage: -agentlib:jmeter=verbose
version
Displays the JVM agent version and quits immediately without running any Java applications at all. You cannot use this option with any other options.
Example usage: -agentlib:jmeter=version
20 Completing Installation of HPjmeter
JVM Options Usage Examples
Here are some examples of JVM agent option usage:
$ -agentlib:jmeter=noalloc,appserver_port=7001,public,include=weblogic:com.bea $ -agentlib:jmeter=nohotspots,owner_private,verbose:file=bcifilters.txt $ -agentlib:jmeter=version $ -agentlib:jmeter

Security Awareness

Securing Communication Between the HPjmeter Node Agent and the Console

IMPORTANT: The data stream between the HPjmeter console and agents is not protected from tampering by a network attacker. You can help ensure that the data you view in HPjmeter visualizers is an accurate reflection of your application's operation and that data confidentiality is protected where needed.
Ensuring the Integrity of HPjmeter Console/Node Agent Data Transfer
For key applications in production, you may want increase your confidence that the data has not been tampered with en route between the agents and console before you take action based on HPjmeter metrics. Where you deem it necessary, confirm that the HPjmeter data looks reasonable according to the usual behavior of your application. You can also pursue using secure socket layer (SSL) tunneling to protect the integrity of data packets and to enhance the reliability of the data reaching the HPjmeter console.
Want to Know More About Secure Socket Layer Tunneling?:
HP-UX IPSec and HP-UX Secure Shell are two HP products that provide secure socket layer tunneling. To learn more:
HP-UX IPSec technical documentation
HP-UX Secure Shell overview and download
HP-UX Secure Shell technical documentation
See also Connecting to the HPjmeter Node Agent (page 197).
Protecting Data Confidentiality During HPjmeter Console/Node Agent Communication
Data sent to the console is not encrypted by HPjmeter. If you are concerned about confidentiality of this data, you can protect confidentiality by using SSL tunneling to encrypt the header and data portion of each packet during transfer.
Working with Firewalls
NOTE: The console first attempts to use a port between 9505 and 9515 when arranging a port for its server socket. If it is unable to successfully use a port from this range, it will use an ephemeral
port number.
The node agent has an open socket. Any HPjmeter console on any machine on the network (that is not blocked by a firewall) can communicate with this node agent. If you want to have a console contact a node agent through a firewall, you must provide a tunneling port so that the console can contact the node agent.
Security Awareness 21
IMPORTANT: If youchoose to open a port through a firewall to enable communication between a node agent and a console, secure the tunneling port using HP-UX Secure Shell or HP-UX IPSec.
Configuring User Access
The node agent must be started by either the same user or group as the running JVM (recommended) or root to establish contact.
IMPORTANT: Setting access for owner or group should not be considered a security solution because node agent to JVM communications are not secured by default—see below.

Securing Communication Between the JVM and the HPjmeter Node Agent

IMPORTANT: The data stream between the JVM and the node agent is not protected from tampering by a user loggedinto the system runningthe JVM. For keyapplications in production, you may want to increase your confidence that the data has not been tampered with en route between the JVM and agent before you take action based on HPjmeter metrics.
Where you deem it necessary, either secure the communication mechanism between the JVM and node agent (HP-UX 11i v2 or later only), or confirm that the HPjmeter data looks reasonable according to the usual behavior of your application by independently validating its output.
To secure the communication mechanism between the JVM and node agent on HP-UX 11i v2 or later operating systems, set the umask of the JVM process to 77 (no access except for the owner) by executing the command
% umask 77
before running the JVM.
Related Topics
Managing Node Agents On HP-UX (page 37)
Node Agent Access Restrictions (page 38)
Connecting to the HPjmeter Node Agent (page 197)
22 Completing Installation of HPjmeter

3 Getting Started

Are You Monitoring an Application or Analyzing Collected Data?

HPjmeter helps you to monitor a live run of your application. You can also view saved data captured using HPjmeter during a live session, by using profiling or garbage collection options when you start your application, or if you are running HP JDK/JRE 5.0.04 (or higher), by starting and stopping profiling data collection from the command line.
Choose the get started information appropriate for your activity:
Using HPjmeter to Monitor Applications (page 23)
Using HPjmeter to Analyze Profiling Data (page 29)
Using HPjmeter to Analyze Garbage Collection Data (page 31)
Profiling with Zero Preparation (page 62)
Need a jumpstart?:
To aid in starting your use of HPjmeter, the console can display a beginning console guide containing hints for getting started. The guide provides hints according to data set selected in the console main pane.
To enable or disable the console guide, click EditWindow Preferences and toggle to the desired option.

Using HPjmeter to Monitor Applications

The following sections summarize how to use HPjmeter to monitor applications. Detailed descriptions of the behavior of HPjmeter are linked to from each section.

Configure and Start Your Application

1. Set the command line of your Java application to use the JVM agent and any desired agent options.
2. Start your application with the JVM agent.
For details, see:
Configuring your Application to Use HPjmeter Command Line Options (page 15)
JVM Agent Options (page 17)

Confirm that the Node Agent is Running

With a standard installation, the node agent should be running on the systems where it was installed.
For details about the node agent, see:
Managing Node Agents On HP-UX (page 37)

Start the Console

Start the console from a local installation on your client workstation.
For starting instructions by platform, see Starting the Console.

Connect to the Node Agent from the Console

Procedure 3-2 Connection to Server (Default Mode)
To connect to a node agent:
Are You Monitoring an Application or Analyzing Collected Data? 23
1. Choose Connect from the File menu or click Connect to server [ ]
2. In the Connect to Server dialog box, type the complete host name (server.domain.com) on which a Java application and a corresponding node agent are running.
3. Optionally, in the Optional Port box, specify the same port number that was used when the node agent was started.
4. Click Connect.
After a few moments, the running JVM for each application identified should appear in the console main window pane marked with one of the following symbols:
— A JVM that has already loaded an HPjmeter JVM agent
— A JVM that has not yet loaded an HPjmeter JVM agent
5. Repeat the previous steps if you want to connect to several node agents on several servers at once.
Procedure 3-3 Secured Connection to Server
To connect to a node agent via a SecureShell (SSH) tunnel:
24 Getting Started
1. Choose Connect from the File Menu or click Connect to server [ ]
2. In the Connect to Server dialog box,type the complete host name (server.domain.com)
of the system that is the designated host for the SSH tunnel (the SSH delegate machine).
3. Optionally, in the Optional Port box, specify a port number through which information can
pass from the SSH delegate to the node agent.
4. Check the box labeled Use SSH Options.
The Connect to Server dialog expands to reveal required SSH attributes.
5. Type the IP address External IP) of the SSH delegate.
6. Type the port number (External Port) on the SSH delegate through which information can pass from the SSH delegate machine to the console.
7. Type the port number (Internal Port) listened to on the console side that can accept information from the SSH delegate machine.
8. Click Connect.
After a few moments, the running JVM for each application identified should appear in the console main window pane marked with one of the following symbols: or .
Using HPjmeter to Monitor Applications 25
9. Repeat the previous steps if you want to connect to several node agents.

Set Session Preferences

1. Double-click on the JVM icon in the data pane for the application that you want to monitor.
This opens the Session Preferences dialog box.
26 Getting Started
NOTE:
When the Optional Port Box Is Not Used
The console automatically attempts to use a port on the remote system between 9505 and 9515 when arranging a port for its server socket. If it is unable to successfully use a port from this range, it will use an ephemeral port number.
2. By clicking the tabs in this dialog, you can see the default settings for metrics, filters, and alerts. Enable or disable the settings as desired.
Interdependencies Exist Among Some Metrics and Between Some Metrics and Alerts:
Some metrics are obtained together and do not display independently from one another. When this occurs, checking one metric may activate others, as shown in the following image.
Using HPjmeter to Monitor Applications 27
Some alerts require collection of specific metrics such that even if a metric is de-selected, it may be activated by selection of a related alert.
3. Once all selections are made, click OK. The preferences window will close and the new Open Session will be visible, marked by this icon:
Though it is possible to begin viewing application activity immediately in the monitoring visualizers, you may want to wait for a short period of time before viewing some of the metrics. The length of time needed to collect sufficient data depends on the application size, the load imposed on the application, and on the selected preferences. Typically, a wait of 5 to 30 minutes provides sufficient data to begin seeing significant clues to the application
28 Getting Started
behavior and performance. A longer collection time gives you greater accuracy in the results. For details, see: Setting Monitoring Session Preferences (page 100) .

Changing Session Preferences During a Session

With HPjmeter 4.0 and later, it is possible to change session preferences during a session.
1. Double-click the “Open Session” line in the console for the session that you want to change.
The Session Preferences window opens.
2. Alternately, selecting the “Open Session” line on the console enables the Session Preferences
icon on the console tool bar. Click the icon to open the Session Preferences window.

View Monitoring Metrics During Your Open Session

1. Click on the open session or time slice to highlight the data that you would like to view.
2. Use the Monitor menu on the console main window to select the metrics that you want to
see. Mousing over each category in the cascading menu will reveal the relevant metrics for that category.
3. Click a metric to open a metric visualizer displaying the chosen data.
For details on individual metrics and how to interpret the data display, see:
Using Monitoring Displays (page 117)
Monitoring Applications (page 36)
See also:
Saving Monitoring Metrics Information (page 38)
Using Visualizer Functions (page 116)

Using HPjmeter to Analyze Profiling Data

The following steps summarize how to use HPjmeter to view profiling information from your applications.
Using HPjmeter to Analyze Profiling Data 29
NOTE: If you are running the HP JDK/JRE 5.0.04 or later, you can send a signal to the running JVM to start and stop a profiling data collection period with zero preparation and no interruption of your application. See Profiling with Zero Preparation (page 62).
1. Configure your application.
Change the command line of your Java application to collect the desired type of data: -Xeprof to collect execution profiling information, -agentlib:hprof to generate heap dump at program exit, or -XX:+HeapDump to enable generation of heap dumps using the SIGQUIT signal. There are additional heap dump options. For more details, see the Java™ Troubleshooting
Guide for HP-UX Systems .
2. Run the application to create a data file.
3. Start the console from a local installation on your client workstation.
4. Click FileOpen File to browse for and open the data file, or drag and drop the file onto the console.
5. For all profiling data types, a viewer window opens and displays a set of tabs containing summary and graphical metric data. You will also see the Metrics and Estimate menus containing additional metric display choices, and a control menu for changingthread scope.
30 Getting Started
Loading...
+ 184 hidden pages