public class SystemMonitoring
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
private static class |
SystemMonitoring.LoadCounterTask
A runnable for periodically collecting measurements on the system.
|
private static class |
SystemMonitoring.LogEventTask
Defines a task for creating regular data events.
|
private static class |
SystemMonitoring.SystemConfigurationListener
Implements a configuration listener in order to react to selected
configuration changes at runtime.
|
| Modifier and Type | Field and Description |
|---|---|
private static boolean |
accountForJvmIo
Account for JVM I/O.
|
private static boolean |
accountForProcessData
Account for process data.
|
private static boolean |
accountForSystemIo
Account for System I/O.
|
private static double |
jvmLoadSum
Stores the sum of all JVM loads.
|
private static long |
jvmMemUseSum
Stores the sum of all JVM memory usages.
|
private static SystemMonitoring.LoadCounterTask |
LOAD_COUNTER
Stores the load and statistics collecting thread.
|
static long |
LOAD_COUNTER_PERIOD
Stores the (default) timer execution period for the load counter.
|
private static long |
loadTickCount
Stores the number of load ticks (probes) taken.
|
private static SystemMonitoring.LogEventTask |
logEventTask
Stores the load and statistics collecting thread.
|
static de.uni_hildesheim.sse.system.IMemoryDataGatherer |
MEMORY_DATA_GATHERER
Stores the memory data gatherer.
|
private static int |
outIntervalCount
Stores the number of elapsed out interval counts.
|
private static de.uni_hildesheim.sse.system.IThisProcessDataGatherer |
PROCESS_DATA_GATHERER
Stores the process data gatherer.
|
private static ProcessData |
processData
Stores the local process data object used for collecting minimum and
maximum information.
|
private static de.uni_hildesheim.sse.system.IProcessorDataGatherer |
PROCESSOR_DATA_GATHERER
Stores the processor data gatherer.
|
private static double |
sysLoadSum
Stores the sum of all system loads.
|
private static long |
sysMemUseSum
Stores the sum of all system memory usages.
|
private static de.uni_hildesheim.sse.system.IThreadDataGatherer |
THREAD_DATA_GATHERER
Stores the thread data gatherer.
|
private static java.util.Timer |
timer
Stores the central timer instance.
|
| Modifier | Constructor and Description |
|---|---|
private |
SystemMonitoring()
Prevents instance creation from outside.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
finishTimer()
Finishes the load and statistics counting thread.
|
static long[] |
getAllThreadIds()
Returns the ids of all running threads.
|
static LongLongHashMap |
getAllThreadTicks()
Returns the current thread ticks for all threads.
|
static long |
getAllTicks()
Returns the number of all thread ticks (CPU and user) consumed by
all threads of this JVM.
|
static long |
getCurrentThreadId()
Returns the current thread id.
|
static long |
getCurrentTicks()
Returns the current ticks, i.e. the consumed thread CPU and thread user
time of the current thread.
|
static ProcessData |
getProcessData()
Creates a process data object with the data collected in this class.
|
static ThreadsInfo |
getThreadInfo(long tid,
long instanceid)
Returns information about the currently running thread and other
(monitored and unmonitored remaining threads).
|
static long |
getTicks(long threadId)
Returns the ticks of the given thread.
|
static void |
startTimer()
Starts the load and statistics counting thread.
|
static void |
stopTimer()
Suspends the load and statistics counting thread.
|
public static final long LOAD_COUNTER_PERIOD
public static final de.uni_hildesheim.sse.system.IMemoryDataGatherer MEMORY_DATA_GATHERER
private static final de.uni_hildesheim.sse.system.IThreadDataGatherer THREAD_DATA_GATHERER
private static final de.uni_hildesheim.sse.system.IThisProcessDataGatherer PROCESS_DATA_GATHERER
private static final de.uni_hildesheim.sse.system.IProcessorDataGatherer PROCESSOR_DATA_GATHERER
private static java.util.Timer timer
private static double sysLoadSum
private static ProcessData processData
private static double jvmLoadSum
private static long jvmMemUseSum
private static long sysMemUseSum
private static long loadTickCount
private static boolean accountForJvmIo
private static boolean accountForSystemIo
private static boolean accountForProcessData
private static int outIntervalCount
-1 to force output
on first opportunity depending on Configuration.getOutInterval().private static final SystemMonitoring.LoadCounterTask LOAD_COUNTER
private static SystemMonitoring.LogEventTask logEventTask
private SystemMonitoring()
public static final long getAllTicks()
public static final long getCurrentTicks()
public static final long getTicks(long threadId)
threadId - the id of the thread to return the ticks forpublic static final LongLongHashMap getAllThreadTicks()
public static long[] getAllThreadIds()
public static void startTimer()
public static void stopTimer()
public static void finishTimer()
public static ThreadsInfo getThreadInfo(long tid, long instanceid)
tid - the thread idinstanceid - the instance id (disabled if 0)public static long getCurrentThreadId()
public static ProcessData getProcessData()
ProcessData.POOL, may be null if not available