Manuals
/
Brands
/
Computer Equipment
/
Software
/
HP
/
Computer Equipment
/
Software
HP
UX Java Software manual
1
1
214
214
Download
214 pages, 3.67 Mb
HPjmeter 4.2 User's Guide
HP Part Number:
5900-2022
Published: December 2011
Edition: 1
Contents
Page
Page
Table of Contents
About This Document
1 Introducing HPjmeter
2 Completing Installation of HPjmeter
3 Getting Started
4 Monitoring Applications
5 Profiling Applications
6 Analyzing Garbage Collection Data
7 Using the Console
8 Using Visualizer Functions
Page
Page
9 Understanding How HPjmeter Works
10 Troubleshooting
A Quick References
Index
About This Document
Intended Audience
Typographic Conventions
Additional HPjmeter Documents
Related Information
Publishing History
HP Encourages Your Comments
1 Introducing HPjmeter
Features
Concepts
JVM Agent
Node Agent
2 Completing Installation of HPjmeter
Platform Support and System Requirements
Agent Requirements
Console Requirements
Completing the installation
File Locations
Attaching to the JVM Agent of a Running Application
Configuring your Application to Use HPjmeter Command Line Options
Preparing to run Java
Example Usage
JVM Agent Options
bytecode instrumentation
JVM agent filters
Console filters
•You can change the default behavior by using the include option. For example:
-agentlib:jmeter=include=com.ibm.ws,exclude=com.ibm.ws.io
-agentlib:jmeter=exclude=sun.jdbc.odbc:other-package-names
sun.jdbc.odbc
not
Page
Security Awareness
Securing Communication Between the HPjmeter Node Agent and the Console
Securing Communication Between the JVM and the HPjmeter Node Agent
3 Getting Started
Are You Monitoring an Application or Analyzing Collected Data
Using HPjmeter to Monitor Applications
Configure and Start Your Application
Confirm that the Node Agent is Running
1.Choose Connect from the File menu or click Connect to server [ ]
Optionally
Optional Port
4.Click Connect
•— A JVM that has already loaded an HPjmeter JVM agent
1.Choose Connect from the File Menu or click Connect to server [ ]
Connect to Server
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
Set Session Preferences
When the Optional Port Box Is Not Used
Interdependencies Exist Among Some Metrics and Between Some Metrics and Alerts:
Once all selections are made, click
Changing Session Preferences During a Session
View Monitoring Metrics During Your Open Session
Using HPjmeter to Analyze Profiling Data
with zero preparation and no interruption of your application
1.Configure your application
Systems
2.Run the application to create a data file
3.Start the console from a local installation on your client workstation
Using HPjmeter to Analyze Garbage Collection Data
Monitoring Demonstration Instructions
Memory Leak Applications
Thread Deadlock Sample
The demo application is available from the HPjmeter installation directory:
Source: $JMETER_HOME/demo/DL1.java
Binary: $JMETER_HOME/demo/DL1.jar
Use —jarDL1.jar with the run_simple_jvmagent script to start the sample
Figure 3-2Thread Deadlock Example Display
4 Monitoring Applications
Controlling Data Collection and Display
Setting Data Collection Preferences
Managing Node Agents
Managing Node Agents On HP-UX
Node Agent Access Restrictions
Running Multiple Node Agents
Saving Monitoring Metrics Information
Saving Data from the Console
Naming Monitoring Data Files
Diagnosing Errors When Monitoring Running Applications
Identifying Unexpected CPU Usage by Method
Viewing the Application Load
Checking for Long Garbage Collection Pauses
Checking for Application Paging Problems
Identifying Excessive Calls to System.gc()
Reviewing the Percentage of Time Spent in Garbage Collection
Page
Checking for Proper Heap Sizing
Confirming Java Memory Leaks
Determining the Severity of a Memory Leak
Identifying Excessive Object Allocation
Identifying the Site of Excessive Object Allocation
Identifying Abnormal Thread Termination
Identifying Multiple Short-livedThreads
Identifying Excessive Lock Contention
Identifying Deadlocked Threads
Identifying Excessive Thread Creation
Identifying Excessive Method Compilation
Identifying Too Many Classes Loaded
Using the JMX Viewer
Understanding the JMX Summary View
Figure 4-5Appearance of the Summary JMX Viewer When First Opened
JMX Memory Tab
The following image demonstrates some of the features available on this tab
Region Details
Enter
Perform GC
JMX Threads Tab
Threads
Changing Mbean Values and Monitoring the Result
Using the Functions in the JMX Server View
Use Filter
The MBean Attribute Tab
Attributes
Detail Viewer
Editable value
monitoring metric
The MBean Operations Tab
Operations
Operation_Name
getThreadCpuTime
The MBean Notifications Tab
The MBean Information Tab
Information
Page
5 Profiling Applications
Profiling Overview
Tracing
Sampling
Tuning Performance
Preparing a Benchmark
Collecting Profile Data
Profiling with -Xeprof
Profiling with Zero Preparation
Profiling with -agentlib:hprof
-Xrunhprof
Table 5-2Supported -agentlib:hprof options
Naming Profile Data Files
–Xeprofand –agentlib:hprofProfiling Options and Their Corresponding Metrics
Page
•Profiling with -Xeprof(page 61)
•Profiling with -agentlib:hprof(page 63)
Approaches to Analyzing Performance Data
Looking at the Data from the Bottom Up
Looking at the Data from the Top Down
Looking for Inefficiencies in Memory Usage
Considerations in Interpreting the Data
Locating Summary Information for Saved Data Sets
Adjusting Scope
Comparing Profiling Data Files
Scaling Comparison Data
Reading Profiling Histograms
Key to Thread States Reported by
Interpreting the Histogram Presentation
Using Call Graph Trees
Interpreting Call Graph Data
Example of Node Color Display
Options for Manipulating the Call Tree Display
Using Heuristics to Locate Possible Hot Spots
Page
6 Analyzing Garbage Collection Data
Obtaining Garbage Collection Data
Data Collection with -Xverbosegc
Table 6-1Supported -Xverbosegc options for Java 1.5.0.04 (continued)
java ... -Xverbosegc:help
Table 6-2Fields Captured in GC Log Data When Using -Xverbosegc print options
Page
Collecting GC Data with Zero Preparation
Data Collection with -Xloggc
Naming GC Data Files
-Xverbosegcand -XloggcOptions and Their Corresponding Metrics
Comparing Garbage Collection Data Files
Basic Garbage Collection Concepts
Key to Garbage Collection Types Recognized by HPjmeter
Understanding the Summary Presentation of GC Data
Figure 6-2Summary Panel Showing Garbage Collection Statistics
Heap Capacity
Peak Usage of Capacity
GC Activity Summary
Duration of the Measurement
Understanding the System Details Captured with GC Data
Page
Page
7 Using the Console
Starting the Console
Starting the Console On HP-UX
Starting the Console On Linux
Starting the Console On Microsoft Windows
Data Representation
Icons and Their Meaning
Table 7-2JVM Agent Connection Icons (continued)
Open and Cached Sessions
Cached Application Data
Table 7-3Session State Icons
Time Slice Entries
Console Tool Bar Buttons
Console Menu Choices
◦Remember Main Window Location
◦Cascade Metric Windows
◦Show Console Guide
◦Confirm Save When Closing the Main Window
—Standard Preferences
Console Guide
Status Bar
Setting Monitoring Session Preferences
Specifying Metrics to Collect for Monitoring
Enabling Monitoring Alerts
Specifying Filters for Monitoring
Viewing Monitoring Data in HPjmeter
Using Alerts
Page
Using the Alert Controller
enable the alert in the session preferences
Figure 7-9Alert Controller Window
You can use the Alert Controller in these ways:
Deactivate or reactivate enabled alerts
log file
Editing E-mailNotification Attributes
Responding to Alerts
Figure 7-12Abnormal Thread Termination Alert Visualizer
•Poor application response
•The entire application terminates
Uncaught Exception Statistics
These statistics are derived from more than one metric
Show Packages
Show Stacktraces
Excessive Compilation Alert
Expected Out Of Memory Error Alert
GC Duration Notification
Heap Usage Notification
Java Collection Leak Locations Alert
Array Leak Locations Alert
Process CPU Usage Alert
5.Click Apply to activate checking for this threshold
When the set threshold is met, an alert notice is posted on the console
Percent CPU Utilization
For more information, see also:
•Set Session Preferences (page 26)
Thread Deadlock Alert
Unfinalized Queue Growth
Unfinalized Queue Growth
8 Using Visualizer Functions
Visualizer Behavior When Monitoring Behavior or Analyzing Data
Locating Information About a JVM and its Environment
Using Monitoring Displays
Monitor Code and/or CPU Activity Menu
Page
•The application runs on a single CPU system
•The application does not consume a lot of CPU
•The application consumes CPU exclusively in non-profiledmethods
•Data Sampling Considerations (page 188)
•Time Units (page 69)
Page
Monitor Memory and/or Heap Activity Menu
Garbage Collections
young generation
GC Duration
Percentage of Time Spent in Garbage Collection
Unfinalized Objects
Allocated Object Statistics by Class
Figure 8-8Monitoring Metric: Allocated Object Statistics by Class
•“Data Sampling Considerations”
Allocating Method Statistics
Shows the methods that allocate the most objects
Current Live Heap Objects
Refresh Live Objects
Figure 8-10Monitoring Metric: Current Live Heap Objects
Table 8-1Data Shown in Current Live Heap Objects Visualizer
To select a portion of the data
Copy Selection to Buffer
Monitor Threads and/or Locks Menu
Lock Contention
already acquired by another thread
Running
All remaining cases
•Lock Contention appears as red in the display
Lock Contention
Provides lock contention statistics
The reported data is cumulative over the lifetime of the session
Figure 8-14Monitoring Metric: Lock Contention
Monitor JVM and/or System Activity Menu
Method Compilation Frequency
Loaded Classes
Percent (%) CPU Utilization
Viewing Profiling or GC Data in HPjmeter
Using Profile Displays
Page
Page
Menu Choices
Profile Code and/or CPU Activity
Exclusive Method Times (CPU)
exclusive times
Exclusive Method Clock Times
Call Graph Tree with Call Count
Call Graph Tree with CPU
Call Graph Tree with Clock Time
Inclusive Method CPU Times
Inclusive Method Clock Times
Average Exclusive Method CPU Times
Average Exclusive Method Clock Times
Average Inclusive Method CPU Times
Average Inclusive Method Clock Times
Starvation by Method
These are possible reasons for reported starvation:
Profile Memory and/or Heap Activity
These metrics –
Objects Created by Method
Created Objects (Count)
Created Objects (Bytes)
•Allocation Site Statistics (page 161)
finalize()
•Threads Histogram (page 152)
Reference Graph Tree
Shows all live objects and references between them
Expanding the nodes shows which references a given object holds
Figure 8-19Reference Sub-Treesby Size Visualizer – Attributes table
Object and Primitive Value Tables
The Attributes table shows the names and values of the
Page
Page
Class Loaders
Figure 8-24Class Types Pop-upWindow
Use
Mark
Find
•Reference Graph Tree (page 146)
Profile by Threads
Profile by Locks
Contested Lock Claims by Method
All Lock Claims by Method
Lock Delay - Method Exclusive
Lock Delay - Call Graph Tree
Lock Delay - Method Inclusive
Lock Contention Ratio by Method
Average Exclusive Method Lock Delay
Exclusive Method Lock Delay / Clock Time
Average Inclusive Method Lock Delay
Using Heuristic Metrics from the Estimate Menu
Using Specialized Garbage Collection Displays
Heap Usage After GC
Duration (Stop the World)
Cumulative Allocation
Creation Rate
Allocation Site Statistics
combined
separated
Combined Sets
Show Clock Time
Figure 8-31GC Metric: Combined Sets of Allocation Site Statistics
Filter
Page
Filter Field Descriptions:
Time
All
% Allocated
Bytes Allocated
How a Snapshot of Allocation Sites Statistics is Shown in GC Visualizers
User-Defined X-YAxes
Multiple User-Defined
Figure 8-38Multiple User-DefinedMetrics
Figure 8-39Multiple User-DefinedMetric Configuration Box
Metric Selection Mode
Single
Multiple
Glance Data
Page
Figure 8-41Glance Data Metric Configuration Box
tab
describes the metrics available for display in the metric configuration
pop-up
box of the
Table 8-2Metrics Shown in Glance Adviser Visualizer (continued)
Glance System Call Data
Page
Using Visualizer Tool Bars
Common Tool Bar Buttons
Tool Bar Buttons for Manipulating Tabular Data
Tool Bar Buttons for Manipulating Graphical Data
Special Button or Other Gadget Functions
Mark
Mark to Find
Marked java.util.BitSet.recalculatedUnitsinUse
Using the Marked Object List on the Console
To use this feature, do the following:
•Java package name
•Java class name
•Java type name (classes, primitive types, and arrays)
•Java method name
•Java object reference (ID)
Clear
Find All
Pause or Resume Graphical Time-basedScrolling
Changing Time Interval in GC Data Visualizers
Page
Page
Changing Time Interval in Monitoring Visualizers
Change Color Selection for Histogram Display
Page
9 Understanding How HPjmeter Works
Performance Overhead on Running Applications
Application Server Startup Time
Monitoring Overhead
Profiling Overhead and Intrusion
Data Sampling Considerations
Using Confidence Interval to Indicate Sample Validity
How Memory Leak Detection Works
Tapping in to Standard Management of the Java Virtual Machine
Page
10 Troubleshooting
Documentation and Support
Identifying Version Numbers
Installation
Console
JVM agent
Node agent
Zero Preparation Profiling
Unexpected Behavior in Visualizers
A Quick References
Connecting to the HPjmeter Node Agent
Determining Which HPjmeter Features Are Available With a Specific JVM Version
Default Location of Xverbosegc and Allocation Site Statistics Data Files
Glossary
Page
Page
Index