DiagnosticUtilities

public class DiagnosticUtilities

The DiagnosticUtilities is is a utility for providing useful information for monitoring and debugging the JVM.

Author:Twinsen Tsang

Methods

dumpAllThread

public void dumpAllThread()

Dump all threads information from the current JVM.

dumpAllThread

public void dumpAllThread(OutputStream os, int stackTraceDepth)

Dump all threads information from the current JVM to the specified OutputStream os.

Parameters:
  • os – The output stream to dump the threads information.
  • stackTraceDepth – The depth of stack trace to dump, default is 3.
Throws:

dumpAllThread

public void dumpAllThread(Writer w, int stackTraceDepth)

Dump all threads information from the current JVM to the specified OutputStream w.

Parameters:
  • w – The writer used to dump the threads information.
  • stackTraceDepth – The depth of stack trace to dump, default is 3.
Throws:

getInstance

public static DiagnosticUtilities getInstance()

Get the single instance of DiagnosticUtilities.

Returns:the single instance of DiagnosticUtilities.

getNewInstance

public static DiagnosticUtilities getNewInstance()

Get the new instance of DiagnosticUtilities.

Returns:the new instance of DiagnosticUtilities.

main

public static void main(String[] args)