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

Why ListIterator Has add Method But Iterator Does Not Have in Jav ...

Replacing Hashtable With ConcurrentHashMap in Java

How remove Method is Implemented in a HashMap in Java ?

Why Do You Use Upcasting or Downcasting in Java ?

How Can You Upload a Large File in JSP ?