Presentation is loading. Please wait.

Presentation is loading. Please wait.

Monitoring and Management Mihail Stoynov mihail.stoynov.com mihail.stoynov.com.

Similar presentations


Presentation on theme: "Monitoring and Management Mihail Stoynov mihail.stoynov.com mihail.stoynov.com."— Presentation transcript:

1 Monitoring and Management Mihail Stoynov mihail.stoynov.com mihail.stoynov.com

2 Java Process Status Tool jps

3

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

5 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 A simple application seen through JConsole, jstack

7 Remote monitoring using JConsole

8 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 Saving using JConsole

10 Heap Histogram on OutOfMemoryError jinfo –flag +HeapDumpOnOutMemoryError... java.lang.OutOfMemoryError: Java heap space Dump 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 Monitoring and Management Mihail Stoynov mihail.stoynov.com mihail.stoynov.com


Download ppt "Monitoring and Management Mihail Stoynov mihail.stoynov.com mihail.stoynov.com."

Similar presentations


Ads by Google