public interface DiagnosticsMBean
Modifier and Type | Field and Description |
---|---|
static String |
MBEAN_NAME_DRIVER
The name of this MBean in a driver.
|
static String |
MBEAN_NAME_NODE
The name of this MBean in a node.
|
Modifier and Type | Method and Description |
---|---|
Double |
cpuLoad()
Get an approximation of the current CPU load.
|
void |
gc()
Perform a garbage collection.
|
Boolean |
hasDeadlock()
Determine whether a deadlock is detected in the JVM.
|
HealthSnapshot |
healthSnapshot()
Get a summarized snapshot of the JVM health.
|
String |
healthSnapshotAsString()
Get a a string representation of a JVM health snapshot.
|
String |
heapDump()
Trigger a heap dump of the JVM.
|
MemoryInformation |
memoryInformation()
Get the diagnostics info for the whole JVM.
|
ThreadDump |
threadDump()
Get a full thread dump, including detection of deadlocks.
|
String[] |
threadNames()
Get the names of all live threads in the current JVM.
|
static final String MBEAN_NAME_DRIVER
static final String MBEAN_NAME_NODE
MemoryInformation memoryInformation() throws Exception
MemoryInformation
instance.Exception
- if any error occurs.String[] threadNames() throws Exception
Exception
- if any error occurs.void gc() throws Exception
System.gc()
.Exception
- if any error occurs.ThreadDump threadDump() throws Exception
ThreadDump
instance.Exception
- if any error occurs.Boolean hasDeadlock() throws Exception
true
if a deadlock is detected, false
otherwise.Exception
- if any error occurs.HealthSnapshot healthSnapshot() throws Exception
HealthSnapshot
instance.Exception
- if any error occurs.String healthSnapshotAsString() throws Exception
Properties
or TypedProperties
object via their load(Reader)
method, using a StringReader
.Properties
-compatible string representation of a JVM health snapshot.Exception
- if any error occurs.String heapDump() throws Exception
Exception
- if any error occurs.Double cpuLoad()
sumi(thread_used_cpui) / interval
, for all the
live threads of the JVM at the time of the computation. Thus, errors may occur,
since many threads may have been created then died between two computations.
However, in most cases this is a reasonable approximation, whose computation does not
tax the CPU too heavily.[0, 1]
(ratio of totalCpuTime / computationInterval
),
or -1d if CPU time measurement is not available for the JVM.Copyright © 2005-2018 JPPF Team.