public class LoadMeasureThread
extends java.lang.Thread
LoadMeasureOSHI
, LoadMeasureAvgOSHI
, LoadMeasureJVM
and
LoadMeasureAvgJVM
are used in detail.LoadMeasureOSHI
,
LoadMeasureAvgOSHI
,
LoadMeasureJVM
,
LoadMeasureAvgJVM
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
threadName
The name of the running Thread.
|
Constructor and Description |
---|
LoadMeasureThread()
Simple constructor of this class.
|
LoadMeasureThread(java.lang.Integer msInterval,
java.lang.Integer useN4AvgCount)
Constructor of this class with values for measure-interval
and moving (sliding) average.
|
Modifier and Type | Method and Description |
---|---|
static void |
doThreadMeasurement(long timestamp,
ThreadProtocolReceiver threadProtocolReceiver)
Does the thread measurement.
|
static LoadMeasureAvgJVM |
getAvgLoadMeassureJVM()
Gets the load current avg jvm.
|
static LoadMeasureAvgOSHI |
getAvgLoadMeasureOSHI()
Gets the average load measure OSHI.
|
static float |
getCompositeBenchmarkValue()
Gets the composite benchmark value.
|
static LoadMeasureJVM |
getCurrentLoadMeasureJVM()
Gets the load current jvm.
|
static LoadMeasureOSHI |
getCurrentLoadMeasureOSHI()
Gets the load current.
|
static float |
getLoadCPU()
Gets the load cpu.
|
static float |
getLoadMemoryJVM()
Gets the load memory jvm.
|
static java.lang.Integer |
getLoadNoThreads()
Gets the load no threads.
|
static float |
getLoadRAM()
Gets the load RAM.
|
static int |
getThresholdLevelExceeded()
Gets the threshold levels exceeded.
|
static int |
getThresholdLevelExceededCPU()
Gets the threshold levele exceeded cpu.
|
static int |
getThresholdLevelExceededMemoJVM()
Gets the threshold level exceeded memo jvm.
|
static int |
getThresholdLevelExceededMemoSystem()
Gets the threshold level exceeded memo system.
|
static int |
getThresholdLevelExceededNoThreads()
Gets the threshold level exceeded no threads.
|
static LoadThresholdLevels |
getThresholdLevels()
Gets the threshold levels.
|
static boolean |
isThisThreadExecuted()
Checks if is this thread executed.
|
static void |
registerMonitoringTask(AbstractMonitoringTask monitoringTask)
Can be used to register a JVM monitoring task.
|
static void |
removeMonitoringTask(AbstractMonitoringTask monitoringTask)
Removes the specified monitoring task.
|
static void |
removeMonitoringTasksForAgents()
Removes the monitoring tasks for agents.
|
void |
run() |
static void |
setCompositeBenchmarkValue(float compositeBenchmarkValue)
Sets the composite benchmark value.
|
static void |
setLoadCPU(float loadCPU)
Sets the load cpu.
|
static void |
setLoadMemoryJVM(float loadMemoryJVM)
Sets the load memory jvm.
|
static void |
setLoadNoThreads(java.lang.Integer loadNoThreads)
Sets the load no threads.
|
static void |
setLoadRAM(float loadMemorySystem)
Sets the load RAM.
|
static void |
setThisThreadExecuted(boolean thisThreadExecuted)
Sets the this thread executed.
|
static void |
setThresholdLevelExceeded(int thresholdLevelExceeded)
Sets the threshold levels exceeded.
|
static void |
setThresholdLevelExceededCPU(int thresholdLevelExceededCPU)
Sets the threshold levele exceeded cpu.
|
static void |
setThresholdLevelExceededMemoJVM(int thresholdLevelExceededMemoJVM)
Sets the threshold level exceeded memo jvm.
|
static void |
setThresholdLevelExceededMemoSystem(int thresholdLevelExceededMemoSystem)
Sets the threshold level exceeded memo system.
|
static void |
setThresholdLevelExceededNoThreads(int thresholdLevelExceededNoThreads)
Sets the threshold level exceeded no threads.
|
static void |
setThresholdLevels(LoadThresholdLevels thresholdLevels)
Sets the threshold levels.
|
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
public LoadMeasureThread()
public LoadMeasureThread(java.lang.Integer msInterval, java.lang.Integer useN4AvgCount)
msInterval
- the sampling interval in millisecondsuseN4AvgCount
- the number of measurements, which will be used for the averagepublic void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public static boolean isThisThreadExecuted()
public static void setThisThreadExecuted(boolean thisThreadExecuted)
thisThreadExecuted
- the thisThreadExecuted to setpublic static LoadMeasureOSHI getCurrentLoadMeasureOSHI()
public static LoadMeasureAvgOSHI getAvgLoadMeasureOSHI()
public static LoadMeasureJVM getCurrentLoadMeasureJVM()
public static LoadMeasureAvgJVM getAvgLoadMeassureJVM()
public static LoadThresholdLevels getThresholdLevels()
public static void setThresholdLevels(LoadThresholdLevels thresholdLevels)
thresholdLevels
- the new threshold levelspublic static int getThresholdLevelExceeded()
public static void setThresholdLevelExceeded(int thresholdLevelExceeded)
thresholdLevelExceeded
- the thresholdLevelExceeded to setpublic static int getThresholdLevelExceededCPU()
public static void setThresholdLevelExceededCPU(int thresholdLevelExceededCPU)
thresholdLevelExceededCPU
- the thresholdLevelExceededCPU to setpublic static int getThresholdLevelExceededMemoSystem()
public static void setThresholdLevelExceededMemoSystem(int thresholdLevelExceededMemoSystem)
thresholdLevelExceededMemoSystem
- the thresholdLevelExceededMemoSystem to setpublic static int getThresholdLevelExceededMemoJVM()
public static void setThresholdLevelExceededMemoJVM(int thresholdLevelExceededMemoJVM)
thresholdLevelExceededMemoJVM
- the thresholdLevelExceededMemoJVM to setpublic static int getThresholdLevelExceededNoThreads()
public static void setThresholdLevelExceededNoThreads(int thresholdLevelExceededNoThreads)
thresholdLevelExceededNoThreads
- the thresholdLevelExceededNoThreads to setpublic static void setCompositeBenchmarkValue(float compositeBenchmarkValue)
compositeBenchmarkValue
- the compositeBenchmarkValue to setpublic static float getCompositeBenchmarkValue()
public static float getLoadCPU()
public static void setLoadCPU(float loadCPU)
loadCPU
- the loadCPU to setpublic static void setLoadRAM(float loadMemorySystem)
loadMemorySystem
- the new load RAMpublic static float getLoadRAM()
public static float getLoadMemoryJVM()
public static void setLoadMemoryJVM(float loadMemoryJVM)
loadMemoryJVM
- the new load memory jvmpublic static java.lang.Integer getLoadNoThreads()
public static void setLoadNoThreads(java.lang.Integer loadNoThreads)
loadNoThreads
- the loadNoThreads to setpublic static void doThreadMeasurement(long timestamp, ThreadProtocolReceiver threadProtocolReceiver)
ThreadProtocolReceiver
.timestamp
- the time stamp of the initial requestthreadProtocolReceiver
- the ThreadProtocolReceiver
ThreadProtocolReceiver
public static void registerMonitoringTask(AbstractMonitoringTask monitoringTask)
monitoringTask
- the monitoring taskpublic static void removeMonitoringTask(AbstractMonitoringTask monitoringTask)
monitoringTask
- the monitoring taskpublic static void removeMonitoringTasksForAgents()