1 / 11

Новости в Java SE 6

Новости в Java SE 6. Monitoring and Management. Mihail Stoynov mihail.stoynov.com. Demo. Java Process Status Tool jps. C:> JConsole. JConsole. Dynamic Attach You can connect to every process started in Java SE 6 HotSpot VM (through Attach API)

robbin
Download Presentation

Новости в Java SE 6

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Новости в Java SE 6 Monitoring and Management Mihail Stoynovmihail.stoynov.com

  2. Demo Java Process Status Tool jps

  3. C:\> JConsole

  4. JConsole • Dynamic Attach • You can connect to every process started in Java SE 6 HotSpot VM (through Attach API) • No more -Dcom.sun.management.jmxremoteon every application (Management Agent) • Remote monitoring • Can be password protected • Secure remote monitoring (SSL)

  5. JConsole • Can follow memory • Can see stack trace, thread state • Can see VM summary • Can detect deadlocks • Can see all the MBeans from JMX • Can be used to detect & warn for low memory • Can tell CPU usage • Can save all

  6. Demo A simple application seen through JConsole, jstack

  7. Demo Remote monitoring using JConsole

  8. HeapHistogram • Finding memomy leaks • C:\>jmap -histo 3328 • See how much instances every class has • See how much memory instances occupy • Can filter only live objects in the heap • Can save to a binary file format • JConsole can do that through an JMX Mbean • Can read with jhat

  9. Demo Saving using JConsole

  10. Heap Histogram on OutOfMemoryError jinfo –flag +HeapDumpOnOutMemoryError <pid> ... java.lang.OutOfMemoryError: Java heap spaceDump heap to java_pid1412.hprof ...Heap dump file created [68354173 bytes in 4.416 secs ]Exception in thread "main" java.lang.OutOfMemoryError: Java heap space ... C:\>jhat java_pid1412.hprof

  11. Thank you Monitoring and Management Mihail Stoynovmihail.stoynov.com

More Related