SlideShare a Scribd company logo
1 of 47
Download to read offline
© 2013 IBM Corporation
Chris Bailey – IBM Java Service Architect
26th
September 2013
Build your own Monitoring
With the Java Remote Monitoring API
Document number
© 2013 IBM Corporation
Important Disclaimers
THE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY.
WHILST EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION
CONTAINED IN THIS PRESENTATION, IT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED.
ALL PERFORMANCE DATA INCLUDED IN THIS PRESENTATION HAVE BEEN GATHERED IN A CONTROLLED
ENVIRONMENT. YOUR OWN TEST RESULTS MAY VARY BASED ON HARDWARE, SOFTWARE OR
INFRASTRUCTURE DIFFERENCES.
ALL DATA INCLUDED IN THIS PRESENTATION ARE MEANT TO BE USED ONLY AS A GUIDE.
IN ADDITION, THE INFORMATION CONTAINED IN THIS PRESENTATION IS BASED ON IBM’S CURRENT PRODUCT
PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM, WITHOUT NOTICE.
IBM AND ITS AFFILIATED COMPANIES SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF THE
USE OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR ANY OTHER DOCUMENTATION.
NOTHING CONTAINED IN THIS PRESENTATION IS INTENDED TO, OR SHALL HAVE THE EFFECT OF:
- CREATING ANY WARRANT OR REPRESENTATION FROM IBM, ITS AFFILIATED COMPANIES OR ITS OR THEIR
SUPPLIERS AND/OR LICENSORS
2
© 2013 IBM Corporation3
Introduction to the speaker
 13 years experience developing and deploying Java SDKs
 Recent work focus:
– Java applications in the cloud
– Java usability and quality
– Debugging tools and capabilities
– Requirements gathering
– Highly resilient and scalable deployments
 My contact information:
– baileyc@uk.ibm.com
– http://www.linkedin.com/in/chrisbaileyibm
– http://www.slideshare.net/cnbailey/
© 2013 IBM Corporation4
Goals of this talk
 Introduce the IBM tools for monitoring, debugging and diagnosing problems in the
deployment life cycle
 Understand the capabilities of Health Center
 Learn how to build your own tools using the Health Center data feed
 See how IBM is building on top of the Java tools platform
© 2013 IBM Corporation5
IBM Tools for Java
© 2013 IBM Corporation6
IBM Monitoring and Diagnostic Tools for Java
 A free suite of tools for understanding different aspects of Java applications
– Garbage Collection and Memory Visualizer (GCMV)
– Memory Analyzer (and IBM Extensions for Memory Analyzer)
– Interactive Diagnostic Data Explorer (IDDE)
– Health Center
 Provide visualization, analysis and recommendations
 Available in the IBM Support Assistant
– Provides the “toolbox” in which analysis tools reside
– Assist with opening PMRs and working with IBM Support
– Search feature to query IBM and non-IBM knowledge banks
© 2013 IBM Corporation7
Garbage Collection and Memory Visualizer
 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
© 2013 IBM Corporation8
Memory Analyzer
 Overview:
– Overview of the dump including Java heap
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
 Provides extension API
– Used to provide product based extensions
© 2013 IBM Corporation9
Interactive Diagnostic Data Explorer
 Multi-platform system dump analyzer
– AIX, Linux, i/OS, Windows, z/OS
 Provides dump portability
– Analyse dump on any platform
 Has knowledge of data structures in dump:
– Java, JVM, and some OS structures
 Provides collaborative analysis
– Store progress and notes with the dump
 Provides extension API
– Used to provide automated analysis
© 2013 IBM Corporation10
Health Center
 Live monitoring tool with very low overhead
– Pre-installed in IBM JDKs since Java 5
– Enable at startup: -Xhealthcenter
– Enable at runtime: java -jar healthcenter.jar ID=<pid>
 Understand how your application is behaving
– Monitor Class loading, File I/O, Environment settings, Garbage Collection, Allocations,
Method Profiling, Locking, Native memory use
 Diagnose potential problems, with recommendations
 Suitable for all Java applications
© 2013 IBM Corporation11
Health Center
 Environment reporting
– Detects invalid Java options
– Detects options which may hurt performance or
serviceability
– Useful for remote diagnosis of configuration-related
problems
 Class loading visualization
– Shows all loaded classes
– Shows load time
– Identifies shared classes
 File I/O
– Monitor application file open/close events as they occur
– Lists currently open files
© 2013 IBM Corporation12
Health Center
 Garbage Collection visualization
– Visualizes heap usage and gc pause times over time
– Identifies memory leaks
– Suggests command-line and tuning parameters
– Java Object allocation profiling by allocating code or type
 Native Memory
– Detect native memory leaks in application
– Determine if external forces are using more memory
– Memory counters showing which parts of the JVM are
using the most native memory
 Threads view
– List of current threads and states
– Number of threads over time
– See contended monitors
© 2013 IBM Corporation13
Health Center
 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
© 2013 IBM Corporation14
Health Center Demo
© 2013 IBM Corporation15
Health Center: Overhead
 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
94
95
96
97
98
99
100
101
102
103
100
Application Throughput
(percentage of baseline)
Baseline
Dormant (level=off)
Network Client
Headless client
(level=headless)
Headless client with ZIP
(level=headless)
© 2013 IBM Corporation16
Health Center: Overhead
 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
94
95
96
97
98
99
100
101
102
103
100
101.76
Application Throughput
(percentage of baseline)
Baseline
Dormant (level=off)
Network Client
Headless client
(level=headless)
Headless client with ZIP
(level=headless)
© 2013 IBM Corporation17
Health Center: Overhead
 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
94
95
96
97
98
99
100
101
102
103
100
101.76
100.4
Application Throughput
(percentage of baseline)
Baseline
Dormant (level=off)
Network Client
Headless client
(level=headless)
Headless client with ZIP
(level=headless)
© 2013 IBM Corporation18
Health Center: Overhead
 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
94
95
96
97
98
99
100
101
102
103
100
101.76
100.4
99.01
Application Throughput
(percentage of baseline)
Baseline
Dormant (level=off)
Network Client
Headless client
(level=headless)
Headless client with ZIP
(level=headless)
© 2013 IBM Corporation19
Health Center: Overhead
 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
94
95
96
97
98
99
100
101
102
103
100
101.76
100.4
99.01
96.99
Application Throughput
(percentage of baseline)
Baseline
Dormant (level=off)
Network Client
Headless client
(level=headless)
Headless client with ZIP
(level=headless)
© 2013 IBM Corporation20
Health Center
 Low overhead is achieved by surfacing existing data used by the JVM internally
– Performance overhead is therefore cost of storage or IO
 Garbage Collection Data:
– GC collects metrics to determine how to self tune
• Heap occupancy: expansion or contraction of the heap
• GC durations: expansion/contraction, concurrent kick-off
 Method Profiling:
– JIT compiler collects metrics to determine:
• When to compile: high use methods compiled first
• How to compile: optimize for most common flow through code
• When to recompile: assumptions are now incorrect
© 2013 IBM Corporation21
Java Monitoring API
© 2013 IBM Corporation22
Health Center and the Java Monitoring API
 Health Center obtains its data directly from the Java runtime and produces analysis and
recommendations shown in the Health Center client
 The Java runtime's data is now provided to any consumer via the Java Monitoring API
– Allows any tool to receive, analyze and interpret the data
– Allows those tools to additionally obtain the analysis and recommendations
 IBM Java Runtime provides a monitoring platform!
© 2013 IBM Corporation23
Using the API
 The API can be used in three modes:
– Remote: connecting over a socket connection (with security/authentication etc)
– Local: running inside the monitored application (using a local loop socket)
– Offline: loading a pre-saved binary “.hcd” file
 Performance cost to monitored application is the same as for Health Center
– Running in “local” mode adds has additional impact due to the the cost of parsing data
© 2013 IBM Corporation24
Using the API
 Three step process for obtaining data from the API:
 Obtain a Health Center object
– Using either a File or a Connection
 Obtain a data type object from the Health Center object
– getCpuData() / getGCData() / getThreadsData() / getIOData() / etc
 Request data points from the data type object:
– getCpuData().getProcessUse() / getCpuData.getSystemUse()
© 2013 IBM Corporation25
Obtain a Health Center Object: File
import com.ibm.java.diagnostics.healthcenter.api.ConnectionProperties;
import com.ibm.java.diagnostics.healthcenter.api.HealthCenter;
import com.ibm.java.diagnostics.healthcenter.api.HealthCenterException;
import com.ibm.java.diagnostics.healthcenter.api.factory.HealthCenterFactory;
public class GCGraphPrototype {
static HealthCenter hcAPI = null;
public static void main(String[] args) {
new GCGraphPrototype();
}
GCGraphPrototype() {
try {
hcAPI = HealthCenterFactory.connect(new File("C:healthcenter.hcd"));
} catch (HealthCenterException | FileNotFoundException e) {
e.printStackTrace();
}
testGCAPI();
}
...
Use factory to create Health Center Object
Connect to a File provider
© 2013 IBM Corporation26
Obtain a Health Center Object: Connection
import com.ibm.java.diagnostics.healthcenter.api.ConnectionProperties;
import com.ibm.java.diagnostics.healthcenter.api.HealthCenter;
import com.ibm.java.diagnostics.healthcenter.api.HealthCenterException;
import com.ibm.java.diagnostics.healthcenter.api.factory.HealthCenterFactory;
public class GCGraphPrototype {
static HealthCenter hcAPI = null;
public static void main(String[] args) {
new GCGraphPrototype();
}
GCGraphPrototype() {
ConnectionProperties props = new ConnectionProperties();
try {
hcAPI = HealthCenterFactory.connect(props, true);
} catch (HealthCenterException e) {
e.printStackTrace();
}
testGCAPI();
}
...
Describe your connection target: localhost:1972
Connect to your target
© 2013 IBM Corporation27
Obtain a Health Center Object: Connection
import com.ibm.java.diagnostics.healthcenter.api.ConnectionProperties;
import com.ibm.java.diagnostics.healthcenter.api.HealthCenter;
import com.ibm.java.diagnostics.healthcenter.api.HealthCenterException;
import com.ibm.java.diagnostics.healthcenter.api.factory.HealthCenterFactory;
public class GCGraphPrototype {
static HealthCenter hcAPI = null;
public static void main(String[] args) {
new GCGraphPrototype();
}
GCGraphPrototype() {
ConnectionProperties props = new ConnectionProperties("192.168.1.105", 35535));
try {
hcAPI = HealthCenterFactory.connect(props, true);
} catch (HealthCenterException e) {
e.printStackTrace();
}
testGCAPI();
}
...
Describe a target of 192.168.1.105:35535
© 2013 IBM Corporation28
Obtain a Health Center Object: Connection Security
import com.ibm.java.diagnostics.healthcenter.api.ConnectionProperties;
import com.ibm.java.diagnostics.healthcenter.api.HealthCenter;
import com.ibm.java.diagnostics.healthcenter.api.HealthCenterException;
import com.ibm.java.diagnostics.healthcenter.api.factory.HealthCenterFactory;
public class GCGraphPrototype {
static HealthCenter hcAPI = null;
public static void main(String[] args) {
new GCGraphPrototype();
}
GCGraphPrototype() {
ConnectionProperties props = new ConnectionProperties("192.168.1.105", 35535));
props.setJmxUsername("Username");
props.setJmxPassword("Password");
try {
hcAPI = HealthCenterFactory.connect(props, true);
} catch (HealthCenterException e) {
e.printStackTrace();
}
testGCAPI();
}
...
Add JMX authentication
© 2013 IBM Corporation29
Obtain a Health Center Object: Connection Security
import com.ibm.java.diagnostics.healthcenter.api.ConnectionProperties;
import com.ibm.java.diagnostics.healthcenter.api.HealthCenter;
import com.ibm.java.diagnostics.healthcenter.api.HealthCenterException;
import com.ibm.java.diagnostics.healthcenter.api.factory.HealthCenterFactory;
public class GCGraphPrototype {
static HealthCenter hcAPI = null;
public static void main(String[] args) {
new GCGraphPrototype();
}
GCGraphPrototype() {
ConnectionProperties props = new ConnectionProperties("192.168.1.105", 35535));
props.setSSLTruststoreLocation("Location");
props.setSSLTruststorePassword("Password");
try {
hcAPI = HealthCenterFactory.connect(props, true);
} catch (HealthCenterException e) {
e.printStackTrace();
}
testGCAPI();
}
...
Add SSL encryption
© 2013 IBM Corporation30
testGCAPI():
private static void testGCAPI() {
GCGraph demo = new GCGraph();
demo.updateDataSet(hcAPI.getGCData().getGCPauseTimeData());
demo.pack();
demo.setVisible(true);
while (true) {
demo.updateDataSet(hcAPI.getGCData().getGCPauseTimeData());
demo.repaint();
try {
Thread.sleep(2 * 1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
Get the GC Data provider
Get information on Pause Times
© 2013 IBM Corporation31
testGCAPI():
private static void testGCAPI() {
GCGraph demo = new GCGraph();
demo.updateDataSet(hcAPI.getGCData().getUsedHeapData());
demo.pack();
demo.setVisible(true);
while (true) {
demo.updateDataSet(hcAPI.getGCData().getUsedHeapData());
demo.repaint();
try {
Thread.sleep(2 * 1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
Get Java Heap usage information
© 2013 IBM Corporation32
testGCAPI():
private static void testGCAPI() {
GCGraph demo = new GCGraph();
demo.updateDataSet(hcAPI.getGCData().getHeapSizeData());
demo.pack();
demo.setVisible(true);
while (true) {
demo.updateDataSet(hcAPI.getGCData().getHeapSizeData());
demo.repaint();
try {
Thread.sleep(2 * 1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
Get Java Heap size information
© 2013 IBM Corporation33
testCPUAPI():
private static void testCPUAPI() {
GCGraph demo = new GCGraph();
demo.updateDataSet(hcAPI.getCpuData().getProcessUse());
demo.pack();
demo.setVisible(true);
while (true) {
demo.updateDataSet(hcAPI.getCpuData().getProcessUse());
demo.repaint();
try {
Thread.sleep(2 * 1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
Get the CPU Data provider
Get information on JVM CPU usage
© 2013 IBM Corporation34
testCPUAPI():
private static void testCPUAPI() {
GCGraph demo = new GCGraph();
demo.updateDataSet(hcAPI.getCpuData().getSystemUse());
demo.pack();
demo.setVisible(true);
while (true) {
demo.updateDataSet(hcAPI.getCpuData().getSystemUse());
demo.repaint();
try {
Thread.sleep(2 * 1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
Get information on overall CPU usage
© 2013 IBM Corporation35
GCGraph Class:
public class GCPauseGraph extends JFrame {
private XYSeriesCollection gcDataSet;
private static final long serialVersionUID = 1L;
public GCGraph() {
super();
gcDataSet = new XYSeriesCollection();
JFreeChart lineChartObject = ChartFactory.createXYLineChart(
“gc pauses”, "time (seconds)", "pause time (ms)",
getGCDataSet(), PlotOrientation.VERTICAL, true, true, false);
ChartPanel chartPanel = new ChartPanel(lineChartObject);
chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
setContentPane(chartPanel);
}
Extends Swing JFrame
Store data as X,Y values
Create a JFreeChart line plot
Add the JFreeChart to the JFrame
© 2013 IBM Corporation36
GCGraph Class:
public void updateDataSet(PauseData[] pD) {
final XYSeries series1 = new XYSeries("Pause Times");
if (pD != null) {
for (int i = 0; i < pD.length; i++) {
series1.add(pD[i].getTime() / 1000, pD[i].getPauseTime());
}
getGCDataSet().removeAllSeries();
getGCDataSet().addSeries(series1);
}
}
Create a JFree XYSeries
Populate with data
Remove old data
Add new data
© 2013 IBM Corporation37
Monitoring API Demo
© 2013 IBM Corporation38
Usage by IBM
© 2013 IBM Corporation39
Rational Application Developer 9.0
 In addition to supporting trace-based profiling, Rational Application Developer v9.0 Beta now
supports sample-based profiling for diagnosing execution time problems.
 Using the Monitoring API, introduced in Health Center v2.1
– Very low overhead compare with trace-based profiling.
– Available on all supported profiling launch types, including profiling on WAS servers.
© 2013 IBM Corporation40
Rational Application Developer 9.0
© 2013 IBM Corporation41
Rational Application Developer 9.0
© 2013 IBM Corporation42
Rational Application Developer 9.0
© 2013 IBM Corporation43
Rational Application Developer 9.0
© 2013 IBM Corporation44
Summary
 IBM is providing a very low overhead mechanism for accessing monitoring and profiling data
 Allows building of your own tools
 Same mechanism is being used by IBMs tools
© 2013 IBM Corporation45
http://ibm.co/JavaOne2013
© 2013 IBM Corporation46
References
 IBM Monitoring and Diagnostic Tools for Java™
– http://www.ibm.com/developerworks/java/jdk/tools/
 IBM Extensions for Memory Analyzer
– http://www.alphaworks.ibm.com/tech/iema
 Debugging WebSphere Application Server from Dumps (MA)
– http://www.ibm.com/developerworks/websphere/techjournal/1103_supauth/1103_supaut
h.html
 IBM Support Assistant (ISA)
– http://www.ibm.com/software/support/isa
 Email: javatool@uk.ibm.com
© 2013 IBM Corporation47
Copyright and Trademarks
© IBM Corporation 2013. All Rights Reserved.
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International
Business Machines Corp., and registered in many jurisdictions worldwide.
Other product and service names might be trademarks of IBM or other companies.
A current list of IBM trademarks is available on the Web – see the IBM “Copyright and
trademark information” page at URL: www.ibm.com/legal/copytrade.shtml

More Related Content

What's hot

Planning For Catastrophe with IBM WAS and IBM BPM
Planning For Catastrophe with IBM WAS and IBM BPMPlanning For Catastrophe with IBM WAS and IBM BPM
Planning For Catastrophe with IBM WAS and IBM BPM
WASdev Community
 
Auto scaling and dynamic routing for was liberty collectives
Auto scaling and dynamic routing for was liberty collectivesAuto scaling and dynamic routing for was liberty collectives
Auto scaling and dynamic routing for was liberty collectives
sflynn073
 
Healthcheck 07 application
Healthcheck 07 applicationHealthcheck 07 application
Healthcheck 07 application
Nakedi Kobo
 

What's hot (20)

WebSphere Technical University: Top WebSphere Problem Determination Features
WebSphere Technical University: Top WebSphere Problem Determination FeaturesWebSphere Technical University: Top WebSphere Problem Determination Features
WebSphere Technical University: Top WebSphere Problem Determination Features
 
IBM InterConnect: Java vs JavaScript for Enterprise WebApps
IBM InterConnect: Java vs JavaScript for Enterprise WebAppsIBM InterConnect: Java vs JavaScript for Enterprise WebApps
IBM InterConnect: Java vs JavaScript for Enterprise WebApps
 
Cloud Economics
Cloud EconomicsCloud Economics
Cloud Economics
 
ZooKeeper and Embedded ZooKeeper Support for IBM InfoSphere Streams V4.0
ZooKeeper and Embedded ZooKeeper Support for IBM InfoSphere Streams V4.0ZooKeeper and Embedded ZooKeeper Support for IBM InfoSphere Streams V4.0
ZooKeeper and Embedded ZooKeeper Support for IBM InfoSphere Streams V4.0
 
AAI-3281 Smarter Production with WebSphere Application Server ND Intelligent ...
AAI-3281 Smarter Production with WebSphere Application Server ND Intelligent ...AAI-3281 Smarter Production with WebSphere Application Server ND Intelligent ...
AAI-3281 Smarter Production with WebSphere Application Server ND Intelligent ...
 
AAI-1445 Managing Dynamic Workloads with WebSphere ND and in the Cloud
AAI-1445 Managing Dynamic Workloads with WebSphere ND and in the CloudAAI-1445 Managing Dynamic Workloads with WebSphere ND and in the Cloud
AAI-1445 Managing Dynamic Workloads with WebSphere ND and in the Cloud
 
Streams Studio Support for IBM InfoSphere Streams V4.0
Streams Studio Support for IBM InfoSphere Streams V4.0Streams Studio Support for IBM InfoSphere Streams V4.0
Streams Studio Support for IBM InfoSphere Streams V4.0
 
Planning For Catastrophe with IBM WAS and IBM BPM
Planning For Catastrophe with IBM WAS and IBM BPMPlanning For Catastrophe with IBM WAS and IBM BPM
Planning For Catastrophe with IBM WAS and IBM BPM
 
Classloader leak detection in websphere application server
Classloader leak detection in websphere application serverClassloader leak detection in websphere application server
Classloader leak detection in websphere application server
 
Monitoring and Tuning Oracle FMW 11g
Monitoring and Tuning Oracle FMW 11gMonitoring and Tuning Oracle FMW 11g
Monitoring and Tuning Oracle FMW 11g
 
AAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
AAI-3218 Production Deployment Best Practices for WebSphere Liberty ProfileAAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
AAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
 
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
AAI-2016 WebSphere Application Server Installation and Maintenance in the Ent...
 
Auto scaling and dynamic routing for was liberty collectives
Auto scaling and dynamic routing for was liberty collectivesAuto scaling and dynamic routing for was liberty collectives
Auto scaling and dynamic routing for was liberty collectives
 
Healthcheck 07 application
Healthcheck 07 applicationHealthcheck 07 application
Healthcheck 07 application
 
Share seattle health_center
Share seattle health_centerShare seattle health_center
Share seattle health_center
 
Magic Quadrant for On-Premises Application Platforms
Magic Quadrant for On-Premises Application PlatformsMagic Quadrant for On-Premises Application Platforms
Magic Quadrant for On-Premises Application Platforms
 
AAI-1304 Technical Deep-Dive into IBM WebSphere Liberty
AAI-1304 Technical Deep-Dive into IBM WebSphere LibertyAAI-1304 Technical Deep-Dive into IBM WebSphere Liberty
AAI-1304 Technical Deep-Dive into IBM WebSphere Liberty
 
Database as a Service, Collaborate 2016
Database as a Service, Collaborate 2016Database as a Service, Collaborate 2016
Database as a Service, Collaborate 2016
 
Liberty Deep Dive
Liberty Deep DiveLiberty Deep Dive
Liberty Deep Dive
 
AAI-4847 Full Disclosure on the Performance Characteristics of WebSphere Appl...
AAI-4847 Full Disclosure on the Performance Characteristics of WebSphere Appl...AAI-4847 Full Disclosure on the Performance Characteristics of WebSphere Appl...
AAI-4847 Full Disclosure on the Performance Characteristics of WebSphere Appl...
 

Similar to JavaOne2013: Build Your Own Runtime Monitoring for the IBM JDK with the Health Center API

JavaOne 2014: Java Debugging
JavaOne 2014: Java DebuggingJavaOne 2014: Java Debugging
JavaOne 2014: Java Debugging
Chris Bailey
 
Dev ops tools and was liberty profile
Dev ops tools and was liberty profileDev ops tools and was liberty profile
Dev ops tools and was liberty profile
sflynn073
 
Dev ops tools and was liberty profile
Dev ops tools and was liberty profileDev ops tools and was liberty profile
Dev ops tools and was liberty profile
sflynn073
 

Similar to JavaOne2013: Build Your Own Runtime Monitoring for the IBM JDK with the Health Center API (20)

WebSphere Technical University: Introduction to the Java Diagnostic Tools
WebSphere Technical University: Introduction to the Java Diagnostic ToolsWebSphere Technical University: Introduction to the Java Diagnostic Tools
WebSphere Technical University: Introduction to the Java Diagnostic Tools
 
Introduction to the IBM Java Tools
Introduction to the IBM Java ToolsIntroduction to the IBM Java Tools
Introduction to the IBM Java Tools
 
Java on zSystems zOS
Java on zSystems zOSJava on zSystems zOS
Java on zSystems zOS
 
JavaOne 2014: Java Debugging
JavaOne 2014: Java DebuggingJavaOne 2014: Java Debugging
JavaOne 2014: Java Debugging
 
JavaOne 2014: Java vs JavaScript
JavaOne 2014:   Java vs JavaScriptJavaOne 2014:   Java vs JavaScript
JavaOne 2014: Java vs JavaScript
 
SAP NetWeaver Application Server Add-On for Code Vulnerability Analysis Overview
SAP NetWeaver Application Server Add-On for Code Vulnerability Analysis OverviewSAP NetWeaver Application Server Add-On for Code Vulnerability Analysis Overview
SAP NetWeaver Application Server Add-On for Code Vulnerability Analysis Overview
 
A165 tools for java and javascript
A165 tools for java and javascriptA165 tools for java and javascript
A165 tools for java and javascript
 
1457 - Reviewing Experiences from the PureExperience Program
1457 - Reviewing Experiences from the PureExperience Program1457 - Reviewing Experiences from the PureExperience Program
1457 - Reviewing Experiences from the PureExperience Program
 
Architecting and Tuning IIB/eXtreme Scale for Maximum Performance and Reliabi...
Architecting and Tuning IIB/eXtreme Scale for Maximum Performance and Reliabi...Architecting and Tuning IIB/eXtreme Scale for Maximum Performance and Reliabi...
Architecting and Tuning IIB/eXtreme Scale for Maximum Performance and Reliabi...
 
SAP Basis Overview
SAP Basis OverviewSAP Basis Overview
SAP Basis Overview
 
Websphere doctor - your guide to diagnose issues
Websphere doctor - your guide to diagnose issues Websphere doctor - your guide to diagnose issues
Websphere doctor - your guide to diagnose issues
 
Securing Java in the Server Room
Securing Java in the Server RoomSecuring Java in the Server Room
Securing Java in the Server Room
 
JavaOne 2015 CON7547 "Beyond the Coffee Cup: Leveraging Java Runtime Technolo...
JavaOne 2015 CON7547 "Beyond the Coffee Cup: Leveraging Java Runtime Technolo...JavaOne 2015 CON7547 "Beyond the Coffee Cup: Leveraging Java Runtime Technolo...
JavaOne 2015 CON7547 "Beyond the Coffee Cup: Leveraging Java Runtime Technolo...
 
Continuous Application Delivery to WebSphere - Featuring IBM UrbanCode
Continuous Application Delivery to WebSphere - Featuring IBM UrbanCodeContinuous Application Delivery to WebSphere - Featuring IBM UrbanCode
Continuous Application Delivery to WebSphere - Featuring IBM UrbanCode
 
IBM Monitoring and Diagnostic Tools - GCMV 2.8
IBM Monitoring and Diagnostic Tools - GCMV 2.8IBM Monitoring and Diagnostic Tools - GCMV 2.8
IBM Monitoring and Diagnostic Tools - GCMV 2.8
 
Virtualization aware Java VM
Virtualization aware Java VMVirtualization aware Java VM
Virtualization aware Java VM
 
Hybrid Analysis Mapping: Making Security and Development Tools Play Nice Toge...
Hybrid Analysis Mapping: Making Security and Development Tools Play Nice Toge...Hybrid Analysis Mapping: Making Security and Development Tools Play Nice Toge...
Hybrid Analysis Mapping: Making Security and Development Tools Play Nice Toge...
 
Dev ops tools and was liberty profile
Dev ops tools and was liberty profileDev ops tools and was liberty profile
Dev ops tools and was liberty profile
 
Dev ops tools and was liberty profile
Dev ops tools and was liberty profileDev ops tools and was liberty profile
Dev ops tools and was liberty profile
 
NZS-4409 - Enterprise Java Monitoring on zOS Discover, Alert, Optimize
NZS-4409 - Enterprise Java Monitoring on zOS Discover, Alert, OptimizeNZS-4409 - Enterprise Java Monitoring on zOS Discover, Alert, Optimize
NZS-4409 - Enterprise Java Monitoring on zOS Discover, Alert, Optimize
 

More from Chris Bailey

More from Chris Bailey (20)

NodeJS Interactive 2019: FaaS meets Frameworks
NodeJS Interactive 2019:  FaaS meets FrameworksNodeJS Interactive 2019:  FaaS meets Frameworks
NodeJS Interactive 2019: FaaS meets Frameworks
 
Voxxed Micro-services: Serverless JakartaEE - JAX-RS comes to FaaS
Voxxed Micro-services: Serverless JakartaEE - JAX-RS comes to FaaSVoxxed Micro-services: Serverless JakartaEE - JAX-RS comes to FaaS
Voxxed Micro-services: Serverless JakartaEE - JAX-RS comes to FaaS
 
Silicon Valley Code Camp 2019 - Reaching the Cloud Native World
Silicon Valley Code Camp 2019 - Reaching the Cloud Native WorldSilicon Valley Code Camp 2019 - Reaching the Cloud Native World
Silicon Valley Code Camp 2019 - Reaching the Cloud Native World
 
FaaS Meets Java EE: Developing Cloud Native Applications at Speed
FaaS Meets Java EE: Developing Cloud Native Applications at SpeedFaaS Meets Java EE: Developing Cloud Native Applications at Speed
FaaS Meets Java EE: Developing Cloud Native Applications at Speed
 
AltConf 2019: Server-Side Swift State of the Union
AltConf 2019:  Server-Side Swift State of the UnionAltConf 2019:  Server-Side Swift State of the Union
AltConf 2019: Server-Side Swift State of the Union
 
Server-side Swift with Swagger
Server-side Swift with SwaggerServer-side Swift with Swagger
Server-side Swift with Swagger
 
Node Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.jsNode Summit 2018: Cloud Native Node.js
Node Summit 2018: Cloud Native Node.js
 
Index - BFFs vs GraphQL
Index - BFFs vs GraphQLIndex - BFFs vs GraphQL
Index - BFFs vs GraphQL
 
Swift Cloud Workshop - Swift Microservices
Swift Cloud Workshop - Swift MicroservicesSwift Cloud Workshop - Swift Microservices
Swift Cloud Workshop - Swift Microservices
 
Swift Cloud Workshop - Codable, the key to Fullstack Swift
Swift Cloud Workshop - Codable, the key to Fullstack SwiftSwift Cloud Workshop - Codable, the key to Fullstack Swift
Swift Cloud Workshop - Codable, the key to Fullstack Swift
 
Try!Swift India 2017: All you need is Swift
Try!Swift India 2017: All you need is SwiftTry!Swift India 2017: All you need is Swift
Try!Swift India 2017: All you need is Swift
 
Swift Summit 2017: Server Swift State of the Union
Swift Summit 2017: Server Swift State of the UnionSwift Summit 2017: Server Swift State of the Union
Swift Summit 2017: Server Swift State of the Union
 
IBM Cloud University: Build, Deploy and Scale Node.js Microservices
IBM Cloud University: Build, Deploy and Scale Node.js MicroservicesIBM Cloud University: Build, Deploy and Scale Node.js Microservices
IBM Cloud University: Build, Deploy and Scale Node.js Microservices
 
IBM Cloud University: Java, Node.js and Swift
IBM Cloud University: Java, Node.js and SwiftIBM Cloud University: Java, Node.js and Swift
IBM Cloud University: Java, Node.js and Swift
 
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-ServicesNode Interactive: Node.js Performance and Highly Scalable Micro-Services
Node Interactive: Node.js Performance and Highly Scalable Micro-Services
 
FrenchKit 2017: Server(less) Swift
FrenchKit 2017: Server(less) SwiftFrenchKit 2017: Server(less) Swift
FrenchKit 2017: Server(less) Swift
 
AltConf 2017: Full Stack Swift in 30 Minutes
AltConf 2017: Full Stack Swift in 30 MinutesAltConf 2017: Full Stack Swift in 30 Minutes
AltConf 2017: Full Stack Swift in 30 Minutes
 
InterConnect: Server Side Swift for Java Developers
InterConnect:  Server Side Swift for Java DevelopersInterConnect:  Server Side Swift for Java Developers
InterConnect: Server Side Swift for Java Developers
 
InterConnect: Java, Node.js and Swift - Which, Why and When
InterConnect: Java, Node.js and Swift - Which, Why and WhenInterConnect: Java, Node.js and Swift - Which, Why and When
InterConnect: Java, Node.js and Swift - Which, Why and When
 
Playgrounds: Mobile + Swift = BFF
Playgrounds: Mobile + Swift = BFFPlaygrounds: Mobile + Swift = BFF
Playgrounds: Mobile + Swift = BFF
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Recently uploaded (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 

JavaOne2013: Build Your Own Runtime Monitoring for the IBM JDK with the Health Center API

  • 1. © 2013 IBM Corporation Chris Bailey – IBM Java Service Architect 26th September 2013 Build your own Monitoring With the Java Remote Monitoring API Document number
  • 2. © 2013 IBM Corporation Important Disclaimers THE INFORMATION CONTAINED IN THIS PRESENTATION IS PROVIDED FOR INFORMATIONAL PURPOSES ONLY. WHILST EFFORTS WERE MADE TO VERIFY THE COMPLETENESS AND ACCURACY OF THE INFORMATION CONTAINED IN THIS PRESENTATION, IT IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. ALL PERFORMANCE DATA INCLUDED IN THIS PRESENTATION HAVE BEEN GATHERED IN A CONTROLLED ENVIRONMENT. YOUR OWN TEST RESULTS MAY VARY BASED ON HARDWARE, SOFTWARE OR INFRASTRUCTURE DIFFERENCES. ALL DATA INCLUDED IN THIS PRESENTATION ARE MEANT TO BE USED ONLY AS A GUIDE. IN ADDITION, THE INFORMATION CONTAINED IN THIS PRESENTATION IS BASED ON IBM’S CURRENT PRODUCT PLANS AND STRATEGY, WHICH ARE SUBJECT TO CHANGE BY IBM, WITHOUT NOTICE. IBM AND ITS AFFILIATED COMPANIES SHALL NOT BE RESPONSIBLE FOR ANY DAMAGES ARISING OUT OF THE USE OF, OR OTHERWISE RELATED TO, THIS PRESENTATION OR ANY OTHER DOCUMENTATION. NOTHING CONTAINED IN THIS PRESENTATION IS INTENDED TO, OR SHALL HAVE THE EFFECT OF: - CREATING ANY WARRANT OR REPRESENTATION FROM IBM, ITS AFFILIATED COMPANIES OR ITS OR THEIR SUPPLIERS AND/OR LICENSORS 2
  • 3. © 2013 IBM Corporation3 Introduction to the speaker  13 years experience developing and deploying Java SDKs  Recent work focus: – Java applications in the cloud – Java usability and quality – Debugging tools and capabilities – Requirements gathering – Highly resilient and scalable deployments  My contact information: – baileyc@uk.ibm.com – http://www.linkedin.com/in/chrisbaileyibm – http://www.slideshare.net/cnbailey/
  • 4. © 2013 IBM Corporation4 Goals of this talk  Introduce the IBM tools for monitoring, debugging and diagnosing problems in the deployment life cycle  Understand the capabilities of Health Center  Learn how to build your own tools using the Health Center data feed  See how IBM is building on top of the Java tools platform
  • 5. © 2013 IBM Corporation5 IBM Tools for Java
  • 6. © 2013 IBM Corporation6 IBM Monitoring and Diagnostic Tools for Java  A free suite of tools for understanding different aspects of Java applications – Garbage Collection and Memory Visualizer (GCMV) – Memory Analyzer (and IBM Extensions for Memory Analyzer) – Interactive Diagnostic Data Explorer (IDDE) – Health Center  Provide visualization, analysis and recommendations  Available in the IBM Support Assistant – Provides the “toolbox” in which analysis tools reside – Assist with opening PMRs and working with IBM Support – Search feature to query IBM and non-IBM knowledge banks
  • 7. © 2013 IBM Corporation7 Garbage Collection and Memory Visualizer  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
  • 8. © 2013 IBM Corporation8 Memory Analyzer  Overview: – Overview of the dump including Java heap 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  Provides extension API – Used to provide product based extensions
  • 9. © 2013 IBM Corporation9 Interactive Diagnostic Data Explorer  Multi-platform system dump analyzer – AIX, Linux, i/OS, Windows, z/OS  Provides dump portability – Analyse dump on any platform  Has knowledge of data structures in dump: – Java, JVM, and some OS structures  Provides collaborative analysis – Store progress and notes with the dump  Provides extension API – Used to provide automated analysis
  • 10. © 2013 IBM Corporation10 Health Center  Live monitoring tool with very low overhead – Pre-installed in IBM JDKs since Java 5 – Enable at startup: -Xhealthcenter – Enable at runtime: java -jar healthcenter.jar ID=<pid>  Understand how your application is behaving – Monitor Class loading, File I/O, Environment settings, Garbage Collection, Allocations, Method Profiling, Locking, Native memory use  Diagnose potential problems, with recommendations  Suitable for all Java applications
  • 11. © 2013 IBM Corporation11 Health Center  Environment reporting – Detects invalid Java options – Detects options which may hurt performance or serviceability – Useful for remote diagnosis of configuration-related problems  Class loading visualization – Shows all loaded classes – Shows load time – Identifies shared classes  File I/O – Monitor application file open/close events as they occur – Lists currently open files
  • 12. © 2013 IBM Corporation12 Health Center  Garbage Collection visualization – Visualizes heap usage and gc pause times over time – Identifies memory leaks – Suggests command-line and tuning parameters – Java Object allocation profiling by allocating code or type  Native Memory – Detect native memory leaks in application – Determine if external forces are using more memory – Memory counters showing which parts of the JVM are using the most native memory  Threads view – List of current threads and states – Number of threads over time – See contended monitors
  • 13. © 2013 IBM Corporation13 Health Center  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
  • 14. © 2013 IBM Corporation14 Health Center Demo
  • 15. © 2013 IBM Corporation15 Health Center: Overhead  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 94 95 96 97 98 99 100 101 102 103 100 Application Throughput (percentage of baseline) Baseline Dormant (level=off) Network Client Headless client (level=headless) Headless client with ZIP (level=headless)
  • 16. © 2013 IBM Corporation16 Health Center: Overhead  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 94 95 96 97 98 99 100 101 102 103 100 101.76 Application Throughput (percentage of baseline) Baseline Dormant (level=off) Network Client Headless client (level=headless) Headless client with ZIP (level=headless)
  • 17. © 2013 IBM Corporation17 Health Center: Overhead  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 94 95 96 97 98 99 100 101 102 103 100 101.76 100.4 Application Throughput (percentage of baseline) Baseline Dormant (level=off) Network Client Headless client (level=headless) Headless client with ZIP (level=headless)
  • 18. © 2013 IBM Corporation18 Health Center: Overhead  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 94 95 96 97 98 99 100 101 102 103 100 101.76 100.4 99.01 Application Throughput (percentage of baseline) Baseline Dormant (level=off) Network Client Headless client (level=headless) Headless client with ZIP (level=headless)
  • 19. © 2013 IBM Corporation19 Health Center: Overhead  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 94 95 96 97 98 99 100 101 102 103 100 101.76 100.4 99.01 96.99 Application Throughput (percentage of baseline) Baseline Dormant (level=off) Network Client Headless client (level=headless) Headless client with ZIP (level=headless)
  • 20. © 2013 IBM Corporation20 Health Center  Low overhead is achieved by surfacing existing data used by the JVM internally – Performance overhead is therefore cost of storage or IO  Garbage Collection Data: – GC collects metrics to determine how to self tune • Heap occupancy: expansion or contraction of the heap • GC durations: expansion/contraction, concurrent kick-off  Method Profiling: – JIT compiler collects metrics to determine: • When to compile: high use methods compiled first • How to compile: optimize for most common flow through code • When to recompile: assumptions are now incorrect
  • 21. © 2013 IBM Corporation21 Java Monitoring API
  • 22. © 2013 IBM Corporation22 Health Center and the Java Monitoring API  Health Center obtains its data directly from the Java runtime and produces analysis and recommendations shown in the Health Center client  The Java runtime's data is now provided to any consumer via the Java Monitoring API – Allows any tool to receive, analyze and interpret the data – Allows those tools to additionally obtain the analysis and recommendations  IBM Java Runtime provides a monitoring platform!
  • 23. © 2013 IBM Corporation23 Using the API  The API can be used in three modes: – Remote: connecting over a socket connection (with security/authentication etc) – Local: running inside the monitored application (using a local loop socket) – Offline: loading a pre-saved binary “.hcd” file  Performance cost to monitored application is the same as for Health Center – Running in “local” mode adds has additional impact due to the the cost of parsing data
  • 24. © 2013 IBM Corporation24 Using the API  Three step process for obtaining data from the API:  Obtain a Health Center object – Using either a File or a Connection  Obtain a data type object from the Health Center object – getCpuData() / getGCData() / getThreadsData() / getIOData() / etc  Request data points from the data type object: – getCpuData().getProcessUse() / getCpuData.getSystemUse()
  • 25. © 2013 IBM Corporation25 Obtain a Health Center Object: File import com.ibm.java.diagnostics.healthcenter.api.ConnectionProperties; import com.ibm.java.diagnostics.healthcenter.api.HealthCenter; import com.ibm.java.diagnostics.healthcenter.api.HealthCenterException; import com.ibm.java.diagnostics.healthcenter.api.factory.HealthCenterFactory; public class GCGraphPrototype { static HealthCenter hcAPI = null; public static void main(String[] args) { new GCGraphPrototype(); } GCGraphPrototype() { try { hcAPI = HealthCenterFactory.connect(new File("C:healthcenter.hcd")); } catch (HealthCenterException | FileNotFoundException e) { e.printStackTrace(); } testGCAPI(); } ... Use factory to create Health Center Object Connect to a File provider
  • 26. © 2013 IBM Corporation26 Obtain a Health Center Object: Connection import com.ibm.java.diagnostics.healthcenter.api.ConnectionProperties; import com.ibm.java.diagnostics.healthcenter.api.HealthCenter; import com.ibm.java.diagnostics.healthcenter.api.HealthCenterException; import com.ibm.java.diagnostics.healthcenter.api.factory.HealthCenterFactory; public class GCGraphPrototype { static HealthCenter hcAPI = null; public static void main(String[] args) { new GCGraphPrototype(); } GCGraphPrototype() { ConnectionProperties props = new ConnectionProperties(); try { hcAPI = HealthCenterFactory.connect(props, true); } catch (HealthCenterException e) { e.printStackTrace(); } testGCAPI(); } ... Describe your connection target: localhost:1972 Connect to your target
  • 27. © 2013 IBM Corporation27 Obtain a Health Center Object: Connection import com.ibm.java.diagnostics.healthcenter.api.ConnectionProperties; import com.ibm.java.diagnostics.healthcenter.api.HealthCenter; import com.ibm.java.diagnostics.healthcenter.api.HealthCenterException; import com.ibm.java.diagnostics.healthcenter.api.factory.HealthCenterFactory; public class GCGraphPrototype { static HealthCenter hcAPI = null; public static void main(String[] args) { new GCGraphPrototype(); } GCGraphPrototype() { ConnectionProperties props = new ConnectionProperties("192.168.1.105", 35535)); try { hcAPI = HealthCenterFactory.connect(props, true); } catch (HealthCenterException e) { e.printStackTrace(); } testGCAPI(); } ... Describe a target of 192.168.1.105:35535
  • 28. © 2013 IBM Corporation28 Obtain a Health Center Object: Connection Security import com.ibm.java.diagnostics.healthcenter.api.ConnectionProperties; import com.ibm.java.diagnostics.healthcenter.api.HealthCenter; import com.ibm.java.diagnostics.healthcenter.api.HealthCenterException; import com.ibm.java.diagnostics.healthcenter.api.factory.HealthCenterFactory; public class GCGraphPrototype { static HealthCenter hcAPI = null; public static void main(String[] args) { new GCGraphPrototype(); } GCGraphPrototype() { ConnectionProperties props = new ConnectionProperties("192.168.1.105", 35535)); props.setJmxUsername("Username"); props.setJmxPassword("Password"); try { hcAPI = HealthCenterFactory.connect(props, true); } catch (HealthCenterException e) { e.printStackTrace(); } testGCAPI(); } ... Add JMX authentication
  • 29. © 2013 IBM Corporation29 Obtain a Health Center Object: Connection Security import com.ibm.java.diagnostics.healthcenter.api.ConnectionProperties; import com.ibm.java.diagnostics.healthcenter.api.HealthCenter; import com.ibm.java.diagnostics.healthcenter.api.HealthCenterException; import com.ibm.java.diagnostics.healthcenter.api.factory.HealthCenterFactory; public class GCGraphPrototype { static HealthCenter hcAPI = null; public static void main(String[] args) { new GCGraphPrototype(); } GCGraphPrototype() { ConnectionProperties props = new ConnectionProperties("192.168.1.105", 35535)); props.setSSLTruststoreLocation("Location"); props.setSSLTruststorePassword("Password"); try { hcAPI = HealthCenterFactory.connect(props, true); } catch (HealthCenterException e) { e.printStackTrace(); } testGCAPI(); } ... Add SSL encryption
  • 30. © 2013 IBM Corporation30 testGCAPI(): private static void testGCAPI() { GCGraph demo = new GCGraph(); demo.updateDataSet(hcAPI.getGCData().getGCPauseTimeData()); demo.pack(); demo.setVisible(true); while (true) { demo.updateDataSet(hcAPI.getGCData().getGCPauseTimeData()); demo.repaint(); try { Thread.sleep(2 * 1000); } catch (InterruptedException e) { e.printStackTrace(); } } } Get the GC Data provider Get information on Pause Times
  • 31. © 2013 IBM Corporation31 testGCAPI(): private static void testGCAPI() { GCGraph demo = new GCGraph(); demo.updateDataSet(hcAPI.getGCData().getUsedHeapData()); demo.pack(); demo.setVisible(true); while (true) { demo.updateDataSet(hcAPI.getGCData().getUsedHeapData()); demo.repaint(); try { Thread.sleep(2 * 1000); } catch (InterruptedException e) { e.printStackTrace(); } } } Get Java Heap usage information
  • 32. © 2013 IBM Corporation32 testGCAPI(): private static void testGCAPI() { GCGraph demo = new GCGraph(); demo.updateDataSet(hcAPI.getGCData().getHeapSizeData()); demo.pack(); demo.setVisible(true); while (true) { demo.updateDataSet(hcAPI.getGCData().getHeapSizeData()); demo.repaint(); try { Thread.sleep(2 * 1000); } catch (InterruptedException e) { e.printStackTrace(); } } } Get Java Heap size information
  • 33. © 2013 IBM Corporation33 testCPUAPI(): private static void testCPUAPI() { GCGraph demo = new GCGraph(); demo.updateDataSet(hcAPI.getCpuData().getProcessUse()); demo.pack(); demo.setVisible(true); while (true) { demo.updateDataSet(hcAPI.getCpuData().getProcessUse()); demo.repaint(); try { Thread.sleep(2 * 1000); } catch (InterruptedException e) { e.printStackTrace(); } } } Get the CPU Data provider Get information on JVM CPU usage
  • 34. © 2013 IBM Corporation34 testCPUAPI(): private static void testCPUAPI() { GCGraph demo = new GCGraph(); demo.updateDataSet(hcAPI.getCpuData().getSystemUse()); demo.pack(); demo.setVisible(true); while (true) { demo.updateDataSet(hcAPI.getCpuData().getSystemUse()); demo.repaint(); try { Thread.sleep(2 * 1000); } catch (InterruptedException e) { e.printStackTrace(); } } } Get information on overall CPU usage
  • 35. © 2013 IBM Corporation35 GCGraph Class: public class GCPauseGraph extends JFrame { private XYSeriesCollection gcDataSet; private static final long serialVersionUID = 1L; public GCGraph() { super(); gcDataSet = new XYSeriesCollection(); JFreeChart lineChartObject = ChartFactory.createXYLineChart( “gc pauses”, "time (seconds)", "pause time (ms)", getGCDataSet(), PlotOrientation.VERTICAL, true, true, false); ChartPanel chartPanel = new ChartPanel(lineChartObject); chartPanel.setPreferredSize(new java.awt.Dimension(500, 270)); setContentPane(chartPanel); } Extends Swing JFrame Store data as X,Y values Create a JFreeChart line plot Add the JFreeChart to the JFrame
  • 36. © 2013 IBM Corporation36 GCGraph Class: public void updateDataSet(PauseData[] pD) { final XYSeries series1 = new XYSeries("Pause Times"); if (pD != null) { for (int i = 0; i < pD.length; i++) { series1.add(pD[i].getTime() / 1000, pD[i].getPauseTime()); } getGCDataSet().removeAllSeries(); getGCDataSet().addSeries(series1); } } Create a JFree XYSeries Populate with data Remove old data Add new data
  • 37. © 2013 IBM Corporation37 Monitoring API Demo
  • 38. © 2013 IBM Corporation38 Usage by IBM
  • 39. © 2013 IBM Corporation39 Rational Application Developer 9.0  In addition to supporting trace-based profiling, Rational Application Developer v9.0 Beta now supports sample-based profiling for diagnosing execution time problems.  Using the Monitoring API, introduced in Health Center v2.1 – Very low overhead compare with trace-based profiling. – Available on all supported profiling launch types, including profiling on WAS servers.
  • 40. © 2013 IBM Corporation40 Rational Application Developer 9.0
  • 41. © 2013 IBM Corporation41 Rational Application Developer 9.0
  • 42. © 2013 IBM Corporation42 Rational Application Developer 9.0
  • 43. © 2013 IBM Corporation43 Rational Application Developer 9.0
  • 44. © 2013 IBM Corporation44 Summary  IBM is providing a very low overhead mechanism for accessing monitoring and profiling data  Allows building of your own tools  Same mechanism is being used by IBMs tools
  • 45. © 2013 IBM Corporation45 http://ibm.co/JavaOne2013
  • 46. © 2013 IBM Corporation46 References  IBM Monitoring and Diagnostic Tools for Java™ – http://www.ibm.com/developerworks/java/jdk/tools/  IBM Extensions for Memory Analyzer – http://www.alphaworks.ibm.com/tech/iema  Debugging WebSphere Application Server from Dumps (MA) – http://www.ibm.com/developerworks/websphere/techjournal/1103_supauth/1103_supaut h.html  IBM Support Assistant (ISA) – http://www.ibm.com/software/support/isa  Email: javatool@uk.ibm.com
  • 47. © 2013 IBM Corporation47 Copyright and Trademarks © IBM Corporation 2013. All Rights Reserved. IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corp., and registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web – see the IBM “Copyright and trademark information” page at URL: www.ibm.com/legal/copytrade.shtml