IBM provides a number of free tools to assist in monitoring and diagnosing issues when running any Java application - from Hello World to IBM or third-party, middleware-based applications. This session introduces attendees to those tools, highlights how they have been extended with IBM middleware product knowledge, how they have been integrated into IBMs development tools, and how to use them to investigate and resolve real-world problem scenarios.
2. 2
Please Note
IBM’s statements regarding its plans, directions, and intent are subject to change
or withdrawal without notice at IBM’s sole discretion.
Information regarding potential future products is intended to outline our general
product direction and it should not be relied on in making a purchasing decision.
The information mentioned regarding potential future products is not a
commitment, promise, or legal obligation to deliver any material, code or
functionality. Information about potential future products may not be incorporated
into any contract. The development, release, and timing of any future features or
functionality described for our products remains at our sole discretion.
Performance is based on measurements and projections using standard IBM
benchmarks in a controlled environment. The actual throughput or performance
that any user will experience will vary depending upon many factors, including
considerations such as the amount of multiprogramming in the user’s job stream,
the I/O configuration, the storage configuration, and the workload processed.
Therefore, no assurance can be given that an individual user will achieve results
similar to those stated here.
3. 3
Introduction to the Speakers
Peter Whitehead
Program Manager, Java Technology Center and ASPN Development
• 23 years experience developing storage subsystems,
program management and deploying IBM's Java SDKs
• Recent work focus:
‒ Improving Critical Patch Update concurrency
‒ Delivery of Java runtimes for IBM platforms and products
‒ Creation of serviceability tooling suite for IBM Java runtimes
‒ Delivery of distributed cloud operating environment for mobile networks
• Contact Details:
‒ peter_whitehead@uk.ibm.com
4. 4
Introduction to the Speakers
Chris Bailey
Java Serviceability and Cloud Integration Architect
• 13 years experience developing and deploying Java SDKs
• Recent work focus:
‒ Java integration into the cloud
‒ Java monitoring, diagnostics and troubleshooting
‒ Requirements gathering
‒ Highly resilient and scalable deployments
• Contact Details:
‒ baileyc@uk.ibm.com
‒ http://www.linkedin.com/in/chrisbaileyibm
‒ http://www.slideshare.net/cnbailey/
6. 6
What I hope to achieve in the next 60 mins
Introduce the IBM tools for monitoring, debugging and diagnosing problems in the
deployment life cycle
Understand the capabilities of each tool
See how the tools can be extended tools with knowledge of applications or to build
custom tools
See how IBM is building on top of the Java tools platform
7. 7
Provide a free unified suite of tools to understand different aspects of
Java applications.
Provide more than visualizations – also provide observations and
recommendations.
IBM supported and always current to latest IBM Java levels.
IBM Monitoring and Diagnostic Tools for Java
8. 8
Where to use our tools
The IBM Monitoring and Diagnostic Tools for Java fall into two distinct pools
“Post-Mortem”:
Informaton created during application life cycle and available for interrogation
offline when the application has finished
• Interactive Diagnostic Dump Explorer
• Memory Analyzer,
• Garbage Collection Memory Visualiser
Runtime Monitoring:
• Health Center
9. 9
Where to get our tools: IBM Support Assistant (ISA)
A workbench for use by your technical personnel to:
− Expedite resolution of problems
− Automate collection of symptom based
“MustGather” data
− View and analyze collected data
− Leverage powerful tools to analyze logs,
JVM core and heap dumps, config files,
etc.
12. 12
Interactive Diagnostic Data Explorer (IDDE)
The IBM JRE Dump artefacts provide insight into the health and integrity of your
application by providing a graphical view of a system dump file
IDDE has been developed to
enable easy access to the
detailed information contained
within a dump artefact
It allows collaboration and user
defined extensions
There is also a community of
extensions and add ons
13. 13
IDDE overview
A visual representation of your set of dump files
An investigation log editor in which you run commands.
Command assistance
Auto-completion of text
The ability to save commands and output, which you can then send to other people
Highlighted text and flagging of issues
The ability to add your own comments
Support for using commands from the following tools
IBM Monitoring and Diagnostic Tools for Java - Dump Analyzer
IBM Monitoring and Diagnostic Tools for Java - Memory Analyzer (technical preview)
An outline view to help you navigate the commands and output in the log editor
14. 14
IDDE Supported Artefacts
Java core
Text file produced by JVM.
Mix of OS and Java data
Portable Heap Dump (PHD)
Binary file produced by JVM
High level view of objects (no fields)
Classloaders
System core file
Binary image produced by OS.
jextract required for native library collection
15. 15
Interactive Diagnostics Data Explorer Extensions
Not just a Java story.....
IDDE is being expanded to bring the service capabilities to new languages
IDDE Extensions have been provide to support IBM SDK for Node.js
New commands added to enable exploration of Node.js core files
Explore the C/C++ data structures in the core
16. 16
Off line tool providing deep insights into
Java Heaps
Powerful analytic capabilities to explore
heap sections, including “deep” and
“shallow” cost
Path to GC Roots
Provides the reference chain that
prevents an object being garbage
collected
Eclipse Equinox bundle explorer (works
with OSGI bundles for WebSphere)
Memory Analyzer (based on Eclipse MAT)
17. 17
Memory Analyzer overview cont…
Overview:
Overview of the heapdump including size and
total number of objects.
Provides links to continued analysis
Path to GC Roots:
Provides the reference chain that prevents
an object being garbage collected.
Dominator Tree grouped by Class Loader:
Lists the biggest objects using a “keep alive tree”.
Grouping by Class
Loader limits the analysis to a single application in
a JEE environment
18. 18
Additional capabilities for debugging generic Java Applications
Extensions currently available for
IBM Java SE runtime
WebSphere Application Server
CICS Transaction Gateway
Using these extensions will enable
Visualization of application and IBM product code
Confirm configuration of IBM Products
Inspect size and contents of IBM products
Extensions are made available through ISA or installed directly into the Memory
Analyser application
Extensions for Memory Analyzer
19. 19
Analyses heap usage, heap size, pause
times, and many other properties
Compare multiple logs in the same plots
and reports
Many data views
Reports
Graphs
Tables
Garbage Collector and Memory Visualizer (GCMV)
20. 20
GCMV overview cont…
Graphical Display of Data
Allows graphing of all available data: pause times, heap size etc
Allows zoom, cropping and change of axes value and units
Allows comparison of multiple files
Analysis and Recommendations
Provides tuning recommendations based on data and
flags errors.
Analysis can be limited using cropping.
Values and units used in analysis can be changed by
changing axes values and units
22. 22
Answers vital questions:
What is my JVM doing? Is everything ok?
Why is my application running slowly? Why
is it not scaling?
Am I using the right options?
Live monitoring with very low overhead
Diagnose potential problems, with
recommendations
Works at the JVM level, no domain-specific
(e.g. J2EE) information
Suitable for all Java applications
Special view for WebSphere Real Time
Helps identify outlier events (class load,
compilation, GC, application method)
IBM Monitoring and Diagnostic Tools for Java™ Health Center
23. 23
Health Center enabled using the command line:
Health Center enabled at runtime using “Late Attach” to a running process:
java -cp /home/whitep/bin/javaApps/multi-tenancy-demo/MTDemo.jar Heartbeat
java -cp /home/whitep/bin/javaApps/multi-tenancy-demo/MTDemo.jar CPUHog 90
Enabling Health Center
java -cp /home/whitep/bin/javaApps/multi-tenancy-demo/MTDemo.jar -Xhealthcenter Heartbeat
24. 24
Health Center Data: Operating System and Machine
Native Memory
• Detect native memory leaks in application
• Determine if external forces are using more memory
• View components using the most native memory
Environment reporting
• Detects invalid Java options
• Detects options which may hurt performance or
serviceability
• Useful for remote diagnosis of configuration-related
problems
Machine and Process CPU Usage
• Visualizes heap usage and gc pause times over time
• Identifies memory leaks
• Suggests command-line and tuning parameters
• Same recommendation logic as GCMV
25. 25
Health Center Data: Java Runtime
Garbage Collection visualization
• Visualizes heap usage and gc pause times over time
• Identifies memory leaks
• Suggests command-line and tuning parameters
• Same recommendation logic as GCMV
Object Allocation Profiling
• Understand what types of data is being allocated and
at what rate
• Determine which code is allocating data
Threads view
• List of current threads and states
• Number of threads over time
• See contended monitors
26. 26
Health Center Data: Java Runtime
Class loading visualization
• Shows all loaded classes
• Shows load time
• Identifies shared classes
• Live class histogram information
I/O
• Monitor application file open/close events as they
occur
• Lists currently open files
27. 27
Health Center Data: Application
Method Profiling
• Always-on profiling shows application activity
• Identifies the hottest methods in an application
• Full call stacks to identify where methods are being
called from and what methods they call
• No byte code instrumentation, no recompiling
Java Lock Profiling
• Always-on lock monitoring
• Quickly allows the usage of all locks to be profiled
• Helps to identify points of contention in the
application that are preventing scaling
Live control of application
• Trigger dumps
• Enable verbosegc collection
28. 28
Measured using WebSphere App Server and the DayTrader benchmark with 50 clients
Running WAS 8.5.5, IBM Java 7 SR5, AIX 7.1, POWER7
Throughput determined by number of completed transactions on 4 saturated CPUs
Health Center overhead
29. 29
Measured using WebSphere App Server and the DayTrader benchmark with 50 clients
Running WAS 8.5.5, IBM Java 7 SR5, AIX 7.1, POWER7
Throughput determined by number of completed transactions on 4 saturated CPUs
Health Center overhead
30. 30
Measured using WebSphere App Server and the DayTrader benchmark with 50 clients
Running WAS 8.5.5, IBM Java 7 SR5, AIX 7.1, POWER7
Throughput determined by number of completed transactions on 4 saturated CPUs
Health Center overhead
31. 31
Measured using WebSphere App Server and the DayTrader benchmark with 50 clients
Running WAS 8.5.5, IBM Java 7 SR5, AIX 7.1, POWER7
Throughput determined by number of completed transactions on 4 saturated CPUs
Health Center overhead
32. 32
Measured using WebSphere App Server and the DayTrader benchmark with 50 clients
Running WAS 8.5.5, IBM Java 7 SR5, AIX 7.1, POWER7
Throughput determined by number of completed transactions on 4 saturated CPUs
Health Center overhead
33. The 2.2 release of Health Center contains a powerful API. The API allows Java™
developers to embed Health Center in their applications
With a few lines of code, you can embed the monitoring power of Health Center in
your own Java application and harness its monitoring power to troubleshoot
problems
// Create the connection object:
ConnectionProperties conn1 = new ConnectionProperties("localhost", 1973);
// Connect to the Health Center agent, using the previous connection
// settings:
HealthCenter hcObject = HealthCenterFactory.connect(conn1, true);
// Get garbage collection data and print:
GCData gcData = hcObject.getGCData();
System.out.println("GC Mode is " + gcData.getGCMode().toString());
Access Health Center data with the API
34. Example: Alert on Heap Usage Threshold
private static void remoteConnect() throws HealthCenterJMXException, HealthCenterSSLException,
HealthCenterException {
ConnectionProperties props = new ConnectionProperties();
try {
healthCenter = HealthCenterFactory.connect(“localhost”, 1972);
} catch (HealthCenterException e) {
e.printStackTrace();
}
}
Create a remote connection to an application runnon at localhost:1972
Provides the healthCenter object used to access all of the data:
private void startJavaMemoryCheck() {
GCData gcData = healthCenter.getGCData();
long maxHeapSize = getConfiguredMaxHeapSize();
boolean breachFound = false;
double thresholdValue = maxHeapSize - (maxHeapSize * thresholdPercentage);
while (true) {
HeapData[] usedHeapData = gcData.getUsedHeapData();
for (HeapData usedHeap : usedHeapData) {
if (usedHeap.getHeapSize() > thresholdValue) {
Date date = new Date(usedHeap.getTime());
System.out.println("Heap threshold breached at " + date);
breachFound = true;
break;
}
}
if (breachFound) break;
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
35. RAD v9 Usage of Health Center Data
Enable “Health Center Agent”
Select “Sample based profiling”
Method CPU usage collected
Displayed in real time
Accessed using API
36. 36
Summary
IBM is building a set of integrated monitoring and diagnostic tools
Taking a ground up approach
Working across teams, products and brands
Providing a consistent user experience
37. Monday, 28-April:
13:00-14:00 Introduction to the IBM Monitoring and Diagnostics tools Delfino 4102
17:15-18:15 Efficiency Gains from Java Packed Objects TBD
Tuesday, 29-April:
14:15-15:15 Meet the Experts: IBM WebSphere Performance San Polo 3501B
17:00-18:00 Meet the Experts: IBM WebSphere Troubleshooting Panel San Polo 3501B
Wednesday, 30-April:
13:00-14:00 Multitenancy and the Multi-Tenant JVM Delfino 4103
14:15-15:15 Performance Optimization Using IBM Java on z/OS & IBM
WebSphere Application Server on z/OS V8.5.5
Lando 4301B
17:00-18:00 Understand & Improve the Performance of Your Application Delfino 4105
Thursday, 01-May:
09:00-11:30 Lab: Diagnostic and Performance Tools for WebSphere Murano 3205
Other Java Related Sessions
38. 38
Where to find more information
IBM Monitoring and Diagnostic Tools for Java™ on developerWorks
http://www.ibm.com/developerworks/java/jdk/tools/
IBM Support Assistant (ISA)
http://www.ibm.com/software/support/isa
Email javatool@uk.ibm.com
40. 40
We Value Your Feedback
Don’t forget to submit your Impact session and speaker feedback! Your feedback is very important to us – we use it
to continually improve the conference.
Use the Conference Mobile App or the online Agenda Builder to quickly submit your survey
• Navigate to “Surveys” to see a view of surveys for sessions
you’ve attended
40