Thread dumps are generated by JVM either automatically or manually. In order to figure out a problem proactively, we might require to generate thread dumps in various scenarios.
Thread dumps are generated using the following command
kill -3 pid
e.g. kill -3 2025
PID is the JVM's process id.
Kill is a command used to send various signals to process.
-3 signal will ask the JVM to generate thread dumps. So JVM generates thread dump for 3 signal.
For JBoss, thread dumps are generated in the standard output. If the instance is started in foreground using run.sh then the thread dump can be seen on the terminal.