More Related Content
Similar to Java Mission Control in Java SE 7U40 (20)
Java Mission Control in Java SE 7U40
- 2. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.2
Java Mission Control
Roger Brinkley
Java Technology Ambassador
Oracle, Corp.
- 3. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.3 Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Agenda Overview
Installation and Usage
Tools Walk Through
- 5. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.5
Purpose and Design
The JDK profiling and diagnostics tools platform
A tools suite for production use (fine in development too)
– Real time monitoring of key indicators and events
– Production time profiling and diagnostics
Focus on low overhead
– Built into the JVM
– Already available runtime information
– High performance implementation
- 6. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.6
Supported Platforms
Client Server
Windows Windows
Linux [x86,x64] Linux [x86,x64]
MacOSX [x64] MacOSX [x64]
Solaris [x86,x64,SPARC]
- 7. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.7
Main Tools
Management Console
– Most comprehensive JMX Consoles available
Flight Recorder
– Built in, high performance JVM event recorder
- 8. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.8
Origins
Originally a JRockit JVM based tools suite (known as JRockit Mission Control)
– JRockit and HotSpot convergence => Java Mission Control
– For JRockit – use JRockit Mission Control 4.1
– For HotSpot – use Java Mission Control 5.2 or later
Now distributed with the JDK in 7u40!
- 9. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.9
INSTALLATION AND USAGE
- 10. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.10
Java Mission Control installation
JMC stand alone client
– Simply download and install the JDK (>=7u40)
– Same /bin directory as java, javac, etc
Eclipse version
– Install from update site on OTN:
http://download.oracle.com/technology/products/missioncontrol/updatesites/base/5.2.0/eclipse/
- 11. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.11
Experimental Plug-ins
Already configured for use in the stand alone client
– Choose Help | Install New Software…
Eclipse version
– Install from update site on OTN:
http://download.oracle.com/technology/products/missioncontrol/updatesites/experimental/5.2.0/eclipse/
Note that experimental plug-ins are:
– Not as thoroughly tested
– Not supported
- 12. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.12
Starting the Java Mission Control Client
Just double-click on the launcher in bin
– On Mac OSX it’s more complicated
The logging settings file (in java.util.logging format) can be specified
from the preferences
– Window | Preferences | Java Mission Control | Logging Settings File
More info on http://hirt.se/blog/?p=281
- 13. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.13
Starting the server
To be able to access Flight Recorder
-XX:+UnlockCommercialFeatures -XX:+FlightRecorder
There are plenty of command line options for controlling Java Flight
Recorder
– Some examples can be found on http://hirt.se/blog
- 14. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.14
Starting the management agent
Use the com.sun.management.jmxremote properties as normal
http://docs.oracle.com/javase/7/docs/technotes/guides/management/agent.html
Don’t forget – rmi registry and server port can be set to the same port –
good for tunneling! (>=7u4)
com.sun.management.jmxremote.rmi.port
To broadcast the presence of the agent on the network (7u40):
com.sun.management.jmxremote.autodiscovery=true
com.sun.management.jdp.name=mygroup/MyJVM (optional)
Sometimes RMI will get the hostname wrong:
java.rmi.server.hostname=<hostname client should use>
For remote access
- 15. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.15
TOOLS WALK-THROUGH
- 16. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.16
The JMX Console Highlights
Simple but feature rich JMX Console
– JConsole on steroids
Real time monitoring of key indicators
Triggers
– Simple rules engine
– Developer/System Admin can provide custom actions
Various experimental plug-ins
– Oracle Coherence
– JConsole plug-in support
- 17. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.17
JMX CONSOLE DEMO
- 18. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.18
Flight Recorder Highlights
High performance JVM event recorder
Produces binary recordings
Recordings are self describing and self contained chunks
Recordings contain runtime profile information
The recorder can be running continuously
– Whenever something happens, the data can
be dumped
– A bit like having a ”black box” for the JVM
More on Flight Recorder in another screencast
- 19. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.20
FLIGHT RECORDER DEMO
- 20. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.21
Experimental Plugins
WLS Plug-in
DTrace Plug-in
– Extended DScript language to produce self describing events
– Visualization similar to Flight Recorder
JOverflow
– Tool for analyzing heap waste (empty/sparse collections)
– Uses hprof dumps
– First stab at using JavaFX for visualization in a JMC plug-in
- 21. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.22
Public Resources
Homepage:
http://oracle.com/missioncontrol
Forum:
http://forums.oracle.com/communitydeveloper/english/java/java_hotspot_virtual_ma
chine/java_mission_control
Twitter:
@javamissionctrl
@hirt
Blog:
http://hirt.se/blog
Facebook:
http://www.facebook.com/pages/Java-Mission-Control/275169442493206
- 22. Copyright © 2013, Oracle and/or its affiliates. All rights reserved.23
The preceding material is intended to outline our
general product direction. It is intended for
information purposes only, and may not be
incorporated into any contract. It is not a commitment
to deliver any material, code, or functionality, and
should not be relied upon in making purchasing
decisions. The development, release, and timing of
any features or functionality described for Oracle’s
products remains at the sole discretion of Oracle.