Threads in ldcstudy.com
java.io.tmpdir:
- <%=System.getProperty("java.io.tmpdir")%>
Memory:
- freeMemory=<%=Runtime.getRuntime().freeMemory()/(1024*1024)%>M
- totalMemory=<%=Runtime.getRuntime().totalMemory()/(1024*1024)%>M
- maxMemory=<%=Runtime.getRuntime().maxMemory()/(1024*1024)%>M
Thread:
<%for(Thread t : list_threads()){%>
- <%=t.getName()%>(<%=t.getState()%>) : <%=t.getClass().getName()%>
<%}%>
<%!
public static java.util.List
list_threads(){
int tc = Thread.activeCount();
Thread[] ts = new Thread[tc];
Thread.enumerate(ts);
return java.util.Arrays.asList(ts);
}
%>
阅读(957) | 评论(0) | 转发(0) |