mirror of
https://github.com/alibaba/arthas.git
synced 2024-04-21 10:21:39 +00:00
jvm命令中LIVE-COUNT命名有问题,应该是PEAK-COUNT,并增加DEADLOCK-COUNT
This commit is contained in:
@@ -206,9 +206,17 @@ public class JvmCommand extends AnnotatedCommand {
|
||||
private Element drawThreadTable(TableElement table) {
|
||||
table.row("COUNT", "" + threadMXBean.getThreadCount())
|
||||
.row("DAEMON-COUNT", "" + threadMXBean.getDaemonThreadCount())
|
||||
.row("LIVE-COUNT", "" + threadMXBean.getPeakThreadCount())
|
||||
.row("STARTED-COUNT", "" + threadMXBean.getTotalStartedThreadCount());
|
||||
.row("PEAK-COUNT", "" + threadMXBean.getPeakThreadCount())
|
||||
.row("STARTED-COUNT", "" + threadMXBean.getTotalStartedThreadCount())
|
||||
.row("DEADLOCK-COUNT","" + getDeadlockedThreadsCount(threadMXBean));
|
||||
return table;
|
||||
}
|
||||
|
||||
private int getDeadlockedThreadsCount(ThreadMXBean threads) {
|
||||
final long[] ids = threads.findDeadlockedThreads();
|
||||
if (ids == null) {
|
||||
return 0;
|
||||
} else {
|
||||
return ids.length;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user