How to get a complete stack trace of a running java program that is taking 100% cpu? January 3, 2024 by Tarik Try with jstack. It’ll give you a full list of what your threads are doing. All it needs is the process pid.