com.hazelcast.util
Class HealthMonitor

java.lang.Object
  extended by java.lang.Thread
      extended by com.hazelcast.util.HealthMonitor
All Implemented Interfaces:
Runnable

public class HealthMonitor
extends Thread

http://blog.scoutapp.com/articles/2009/07/31/understanding-load-averages http://docs.oracle.com/javase/7/docs/jre/api/management/extension/com/sun/management/OperatingSystemMXBean.html

Health monitor periodically prints logs about related internal metrics under when hazelcast is under load. Under load means that memory usage is above threshold percentage or process/cpu load is above threshold.

Health monitor can be configured with system properties

"hazelcast.health.monitoring.level" This property can be one of the following NOISY => does not check threshold , always prints. SILENT(default) => prints only if metrics are above threshold. OFF => Does not print anything.

"hazelcast.health.monitoring.delay.seconds" Time between printing two logs of health monitor. Default values is 30 seconds


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
HealthMonitor(HazelcastInstanceImpl hazelcastInstance, HealthMonitorLevel logLevel, int delaySeconds)
           
 
Method Summary
static String numberToUnit(long number)
           
static String percentageString(double p)
           
 void run()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HealthMonitor

public HealthMonitor(HazelcastInstanceImpl hazelcastInstance,
                     HealthMonitorLevel logLevel,
                     int delaySeconds)
Method Detail

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

percentageString

public static String percentageString(double p)

numberToUnit

public static String numberToUnit(long number)


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.