%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
<%@ page import="java.lang.management.ManagementFactory,
java.lang.management.ThreadMXBean,
java.lang.management.ThreadInfo,
java.io.IOException"%>
<%@include file="header.jsp" %>
<%!
static ThreadMXBean tmbean = ManagementFactory.getThreadMXBean();
%>
<%
out.print(System.getProperty("java.vm.name") +
" " + System.getProperty("java.vm.version") + " "); %> |
<% long[] tids; ThreadInfo[] tinfos; out.print("Thread Count: current=" + tmbean.getThreadCount() + " deamon=" + tmbean.getDaemonThreadCount() + " peak=" + tmbean.getPeakThreadCount()); %> |
<% tids = tmbean.findMonitorDeadlockedThreads(); if (tids == null) { out.print("No deadlock found."); } else { out.print("Deadlock found :-"); tinfos = tmbean.getThreadInfo(tids, Integer.MAX_VALUE); for (ThreadInfo ti : tinfos) { printThreadInfo(ti, out); } } %> |
<%
out.print("Full Thread Dump: "); tids = tmbean.getAllThreadIds(); tinfos = tmbean.getThreadInfo(tids, Integer.MAX_VALUE); for (ThreadInfo ti : tinfos) { printThreadInfo(ti, out); } %> |