ThreadMXBean Platform MBean: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=External= * http://docs.oracle.com/javase/8/docs/api/java/lang/management/ThreadMXBean.html =Internal= =Overview= Represents the management interface for the thread syste...")
 
 
(7 intermediate revisions by the same user not shown)
Line 4: Line 4:


=Internal=
=Internal=
* [[JMX#Thread_Monitoring_and_Management|JMX]]
* [[WildFly_JVM-Level_Monitoring#JVM_Thread_Statistics|WildFly JVM-Level Monitoring]]


=Overview=
=Overview=


Represents the management interface for the thread system of the Java virtual machine. It is accessible under the "java.lang:type=Threading" JMX ObjectName.
Represents the management interface for the thread system of the Java virtual machine.  
 
JMX clients can look it up using its ObjectName:
 
<PRE>
java.lang:type=Threading
</PRE>
 
=API=
 
<syntaxhighlight lang='java'>
MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
Object result = mBeanServer.getAttribute(new ObjectName("java.lang:type=Threading"), "ThreadCount");
</syntaxhighlight>


=Metrics=
=Metrics=


==ThreadCount==
====ThreadCount====


The current number of live threads including both daemon and non-daemon threads.
The current number of live threads including both daemon and non-daemon threads.
====DaemonThreadCount====
====PeakThreadCount====
====TotalStartedThreadCount====
====CurrentThreadCpuTime====
====CurrentThreadUserTime====

Latest revision as of 17:59, 24 July 2017

External

Internal

Overview

Represents the management interface for the thread system of the Java virtual machine.

JMX clients can look it up using its ObjectName:

java.lang:type=Threading

API

MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
Object result = mBeanServer.getAttribute(new ObjectName("java.lang:type=Threading"), "ThreadCount");

Metrics

ThreadCount

The current number of live threads including both daemon and non-daemon threads.

DaemonThreadCount

PeakThreadCount

TotalStartedThreadCount

CurrentThreadCpuTime

CurrentThreadUserTime