mirror of
https://github.com/alibaba/arthas.git
synced 2026-11-30 07:32:57 +00:00
jvm命令中LIVE-COUNT命名有问题,应该是PEAK-COUNT,并增加DEADLOCK-COUNT
This commit is contained in:
1 parent
b697c99904
commit
af45b299a4
2 files changed
+14
-4
No files matched your search
@@ -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