Generate a Java thread dump without restarting.
Here’s how we do it programmatically: http://pastebin.com/uS5jYpd4 We use the JMX ThreadMXBean and ThreadInfo classes: ThreadMXBean mxBean = ManagementFactory.getThreadMXBean(); ThreadInfo[] threadInfos = mxBean.getThreadInfo(mxBean.getAllThreadIds(), 0); … You can also do a kill -QUIT pid under ~unix to dump the stacks to the standard-out. There is also jstack to dump the stack of a JVM. We also … Read more