code: public ThreadInfo[] getThreadDump() {
          ThreadMXBean threadMxBean = ManagementFactory.getThreadMXBean();
          return threadMxBean.dumpAllThreads(true, true);
      }
docs: Gets the thread dump.
  
  @return the thread dump