Monday 6 August 2018

Tools to analyze Java problems

In this tutorial series, I am going to explain different tools to trouble shoot the problems that occur in java applications.


Find out process id of an application
Working with jcmd command
    Jcmd: Thread.print: Get thread dumps
    JFR: Java Flight Recorder
    jcmd: Collect JFR (Java Flight Recorder) information
    Java: jcmd: Print native memory usage
    jcmd: Display status of commercial features
    Jcmd: VM.unlock_commercial_features: unlock commercial features
    Jcmd: ManagementAgent.stop, ManagementAgent.start_local and ManagementAgent.start example
    jcmd: GC.heap_dump: Create heap dump
    Generate GC (Garbage Collection) log file
    Rotate GC Log files
    Jcmd: GC.rotate_log: Rotate the log file
    jcmd: GC.class_stats: Get statistics about Java class meta data
    jcmd: Get the statistics about the Java heap usage
    jcmd: GC.run_finalization: java.lang.System.runFinalization()
    Call 'java.lang.System.runFinalization()' using jcmd command
    jcmd : GC.run: Call garbage collector
    jcmd: VM.uptime: Print VM up time
    jcmd: VM.flags: Print VM flag options and their current values
    jcmd: VM.system_properties: Print VM system properties
    jcmd: VM.command_line: Get the command line used to start this VM instance
    jcmd: VM.version: Print jvm version information
Jstack: Working with jstack command
    jstack: Get thread dump
    Java: How to analyze thread dumps?
HPROF tool: Heap and CPU profiling
Working with jmap
    jmap: prints the list of shared objects loaded
    jmap: Print java heap summary
    jmap: get heap histogram
    jmap: -clstats: Print class loader statistics
    jmp: -finalizerinfo: Get information on objects awaiting finalization
    jmap: -dump:: Dump java heap in hprof binary format
    jmap: Force heap dump generation
Java: Generate heap dump on OutOfMemoryError (on application exit)
Java: Native memory tracking is not enabled
Java: Commercial Features are locked.
Java: Target VM does not support GC log file rotation.
GC.class_stats command requires -XX:+UnlockDiagnosticVMOptions
Eclipse Memory Analyzer Tool (MAT)
GarbageCollectorMXBean: Extract information about garbage collection
jstat: Monitor Java heap, threads, classes
    jstat: Get statistics for every periodic interval
    jstat: Repeat column headers
    jstat: Include time stamp for each sample
jvisualvm: GUI to view information about Java Applications
VisualGC: Visual Garbage Collection Monitoring Tool
How to get the process id of the Java Application?
Java: Generate heap dump programmatically
How to analyse heap dump (.hprof) file?
Remote debugging of Java Application with Eclipse

Previous                                                 Next                                                 Home

No comments:

Post a Comment