Skip to content

Commit

Permalink
0004454: Monitors: Memory and CPU do not provide detailed monitor
Browse files Browse the repository at this point in the history
information
  • Loading branch information
Philip Marzullo committed Mar 18, 2021
1 parent 7ba098d commit 2d001a5
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -93,8 +93,10 @@ protected String getNotificationMessage(long value, long threshold, long period)
ThreadMXBean threadBean = ManagementFactory.getThreadMXBean();
for (long threadId : threadBean.getAllThreadIds()) {
ThreadInfo info = threadBean.getThreadInfo(threadId);
if (info.getThreadState() != Thread.State.TERMINATED) {
rankTopUsage(infos, cpuUsages, info, threadBean.getThreadCpuTime(threadId));
if (info != null) {
if (info.getThreadState() != Thread.State.TERMINATED) {
rankTopUsage(infos, cpuUsages, info, threadBean.getThreadCpuTime(threadId));
}
}
}

Expand Down

0 comments on commit 2d001a5

Please sign in to comment.