jstack is a Java utility that provides a snapshot of the Java Virtual Machine (JVM) thread stack traces. It's a useful tool for troubleshooting and diagnosing issues with Java applications.
The -l flag adds lock information and will explicitly report found deadlocks at the end.
Before installing JStack on Ubuntu, make sure you have the following prerequisites:
sudo -u tomcat jstack 2345