How Can We Take Thread Dump in Java ?

The steps to take Thread dump of Java process depends on the operating system.

On taking Thread dump, Java writes the state of all threads in log files or standard error console.

We can press Ctrl + Break key together to take thread dump in Windows.

We can execute kill -3 command for taking Thread dump on Linux. Another option to take Thread dump is jstack tool. We can pass process id of java process to this tool for taking Thread dump.

This is the simple one, -Xss parameter is used to control stack size of Thread in Java. You can see this list of JVM options to learn more about this parameter.



You May Interest

What are the Differences Between a Checked and Unchecked Exceptio ...

How Will You Define the Scope of a Bean in Spring ?

What is the Difference Between pass by reference and pass by valu ...

What is a Compile Time Constant in Java ?

What are the Java Collection Classes That Implement List Interfac ...