Java Mission Control in Java SE 7U40
-
Upload
roger-brinkley -
Category
Technology
-
view
1.910 -
download
1
description
Transcript of Java Mission Control in Java SE 7U40
![Page 1: Java Mission Control in Java SE 7U40](https://reader033.fdocuments.in/reader033/viewer/2022061114/5461e9cbb1af9f92238b4bbf/html5/thumbnails/1.jpg)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.1
![Page 2: Java Mission Control in Java SE 7U40](https://reader033.fdocuments.in/reader033/viewer/2022061114/5461e9cbb1af9f92238b4bbf/html5/thumbnails/2.jpg)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.2
Java Mission ControlRoger BrinkleyJava Technology AmbassadorOracle, Corp.
![Page 3: Java Mission Control in Java SE 7U40](https://reader033.fdocuments.in/reader033/viewer/2022061114/5461e9cbb1af9f92238b4bbf/html5/thumbnails/3.jpg)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.3Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
Agenda Overview Installation and Usage Tools Walk Through
![Page 4: Java Mission Control in Java SE 7U40](https://reader033.fdocuments.in/reader033/viewer/2022061114/5461e9cbb1af9f92238b4bbf/html5/thumbnails/4.jpg)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.4
OVERVIEW
![Page 5: Java Mission Control in Java SE 7U40](https://reader033.fdocuments.in/reader033/viewer/2022061114/5461e9cbb1af9f92238b4bbf/html5/thumbnails/5.jpg)
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
![Page 6: Java Mission Control in Java SE 7U40](https://reader033.fdocuments.in/reader033/viewer/2022061114/5461e9cbb1af9f92238b4bbf/html5/thumbnails/6.jpg)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.6
Supported Platforms
Client ServerWindows Windows
Linux [x86,x64] Linux [x86,x64]
MacOSX [x64] MacOSX [x64]
Solaris [x86,x64,SPARC]
![Page 7: Java Mission Control in Java SE 7U40](https://reader033.fdocuments.in/reader033/viewer/2022061114/5461e9cbb1af9f92238b4bbf/html5/thumbnails/7.jpg)
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
![Page 8: Java Mission Control in Java SE 7U40](https://reader033.fdocuments.in/reader033/viewer/2022061114/5461e9cbb1af9f92238b4bbf/html5/thumbnails/8.jpg)
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!
![Page 9: Java Mission Control in Java SE 7U40](https://reader033.fdocuments.in/reader033/viewer/2022061114/5461e9cbb1af9f92238b4bbf/html5/thumbnails/9.jpg)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.9
INSTALLATION AND USAGE
![Page 10: Java Mission Control in Java SE 7U40](https://reader033.fdocuments.in/reader033/viewer/2022061114/5461e9cbb1af9f92238b4bbf/html5/thumbnails/10.jpg)
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/
![Page 11: Java Mission Control in Java SE 7U40](https://reader033.fdocuments.in/reader033/viewer/2022061114/5461e9cbb1af9f92238b4bbf/html5/thumbnails/11.jpg)
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
![Page 12: Java Mission Control in Java SE 7U40](https://reader033.fdocuments.in/reader033/viewer/2022061114/5461e9cbb1af9f92238b4bbf/html5/thumbnails/12.jpg)
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
![Page 13: Java Mission Control in Java SE 7U40](https://reader033.fdocuments.in/reader033/viewer/2022061114/5461e9cbb1af9f92238b4bbf/html5/thumbnails/13.jpg)
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
![Page 14: Java Mission Control in Java SE 7U40](https://reader033.fdocuments.in/reader033/viewer/2022061114/5461e9cbb1af9f92238b4bbf/html5/thumbnails/14.jpg)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.14
Starting the management agent
Use the com.sun.management.jmxremote properties as normalhttp://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=truecom.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
![Page 15: Java Mission Control in Java SE 7U40](https://reader033.fdocuments.in/reader033/viewer/2022061114/5461e9cbb1af9f92238b4bbf/html5/thumbnails/15.jpg)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.15
TOOLS WALK-THROUGH
![Page 16: Java Mission Control in Java SE 7U40](https://reader033.fdocuments.in/reader033/viewer/2022061114/5461e9cbb1af9f92238b4bbf/html5/thumbnails/16.jpg)
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
![Page 17: Java Mission Control in Java SE 7U40](https://reader033.fdocuments.in/reader033/viewer/2022061114/5461e9cbb1af9f92238b4bbf/html5/thumbnails/17.jpg)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.17
JMX CONSOLE DEMO
![Page 18: Java Mission Control in Java SE 7U40](https://reader033.fdocuments.in/reader033/viewer/2022061114/5461e9cbb1af9f92238b4bbf/html5/thumbnails/18.jpg)
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
![Page 19: Java Mission Control in Java SE 7U40](https://reader033.fdocuments.in/reader033/viewer/2022061114/5461e9cbb1af9f92238b4bbf/html5/thumbnails/19.jpg)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.20
FLIGHT RECORDER DEMO
![Page 20: Java Mission Control in Java SE 7U40](https://reader033.fdocuments.in/reader033/viewer/2022061114/5461e9cbb1af9f92238b4bbf/html5/thumbnails/20.jpg)
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
![Page 21: Java Mission Control in Java SE 7U40](https://reader033.fdocuments.in/reader033/viewer/2022061114/5461e9cbb1af9f92238b4bbf/html5/thumbnails/21.jpg)
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_machine/java_mission_control
Twitter:@javamissionctrl@hirt
Blog:http://hirt.se/blog
Facebook:http://www.facebook.com/pages/Java-Mission-Control/275169442493206
![Page 22: Java Mission Control in Java SE 7U40](https://reader033.fdocuments.in/reader033/viewer/2022061114/5461e9cbb1af9f92238b4bbf/html5/thumbnails/22.jpg)
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.
![Page 23: Java Mission Control in Java SE 7U40](https://reader033.fdocuments.in/reader033/viewer/2022061114/5461e9cbb1af9f92238b4bbf/html5/thumbnails/23.jpg)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.24