Interface ClusterMetrics
- 
- All Known Subinterfaces:
- ClusterMetricsMXBean
 
 public interface ClusterMetricsThis class represents runtime information on a cluster. Apart from obvious statistical value, this information is used for implementation of load balancing, failover, and collision SPIs. For example, collision SPI in combination with fail-over SPI could check if other nodes don't have any active or waiting jobs and fail-over some jobs to those nodes.Node metrics for any node can be accessed via ClusterNode.metrics()method. Keep in mind that there will be a certain network delay (usually equal to metrics update delay) for the accuracy of node metrics. However, when accessing metrics on local nodeIgniteCluster.localNode().getMetrics()the metrics are always accurate and up to date.Local node metrics are registered as MBeanand can be accessed from any JMX management console. The simplest way is to use standardjconsolethat comes with JDK as it also provides ability to view any node parameter as a graph.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description floatgetAverageActiveJobs()Gets average number of active jobs concurrently executing on the node.floatgetAverageCancelledJobs()Gets average number of cancelled jobs this node ever had running concurrently.doublegetAverageCpuLoad()Gets average of CPU load values over all metrics kept in the history.doublegetAverageJobExecuteTime()Gets average time a job takes to execute on the node.doublegetAverageJobWaitTime()Gets average time jobs spend waiting in the queue to be executed.floatgetAverageRejectedJobs()Gets average number of jobs this node rejects during collision resolution operations.floatgetAverageWaitingJobs()Gets average number of waiting jobs this node had queued.floatgetBusyTimePercentage()Gets percentage of time this node is busy executing jobs vs. idling.intgetCurrentActiveJobs()Gets number of currently active jobs concurrently executing on the node.intgetCurrentCancelledJobs()Gets number of cancelled jobs that are still running.doublegetCurrentCpuLoad()Returns the CPU usage in[0, 1]range.intgetCurrentDaemonThreadCount()Returns the current number of live daemon threads.doublegetCurrentGcCpuLoad()Returns average time spent in CG since the last update.longgetCurrentIdleTime()Gets time this node spend idling since executing last job.longgetCurrentJobExecuteTime()Gets longest time a current job has been executing for.longgetCurrentJobWaitTime()Gets current time an oldest jobs has spent waiting to be executed.longgetCurrentPmeDuration()Gets execution duration for current partition map exchange in milliseconds.intgetCurrentRejectedJobs()Gets number of jobs rejected after more recent collision resolution operation.intgetCurrentThreadCount()Returns the current number of live threads including both daemon and non-daemon threads.intgetCurrentWaitingJobs()Gets number of queued jobs currently waiting to be executed.longgetHeapMemoryCommitted()Returns the amount of heap memory in bytes that is committed for the JVM to use.longgetHeapMemoryInitialized()Returns the amount of heap memory in bytes that the JVM initially requests from the operating system for memory management.longgetHeapMemoryMaximum()Returns the maximum amount of heap memory in bytes that can be used for memory management.longgetHeapMemoryTotal()Returns the total amount of heap memory in bytes.longgetHeapMemoryUsed()Returns the current heap size that is used for object allocation.floatgetIdleTimePercentage()Gets percentage of time this node is idling vs. executing jobs.longgetLastDataVersion()In-Memory Data Grid assigns incremental versions to all cache operations.longgetLastUpdateTime()Gets last update time of this node metrics.intgetMaximumActiveJobs()Gets maximum number of jobs that ever ran concurrently on this node.intgetMaximumCancelledJobs()Gets maximum number of cancelled jobs this node ever had running concurrently.longgetMaximumJobExecuteTime()Gets time it took to execute the longest job on the node.longgetMaximumJobWaitTime()Gets maximum time a job ever spent waiting in a queue to be executed.intgetMaximumRejectedJobs()Gets maximum number of jobs rejected at once during a single collision resolution operation.intgetMaximumThreadCount()Returns the maximum live thread count since the JVM started or peak was reset.intgetMaximumWaitingJobs()Gets maximum number of waiting jobs this node had.longgetNodeStartTime()Returns the start time of grid node in milliseconds.longgetNonHeapMemoryCommitted()Returns the amount of non-heap memory in bytes that is committed for the JVM to use.longgetNonHeapMemoryInitialized()Returns the amount of non-heap memory in bytes that the JVM initially requests from the operating system for memory management.longgetNonHeapMemoryMaximum()Returns the maximum amount of non-heap memory in bytes that can be used for memory management.longgetNonHeapMemoryTotal()Returns the total amount of non-heap memory in bytes that can be used for memory management.longgetNonHeapMemoryUsed()Returns the current non-heap memory size that is used by Java VM.intgetOutboundMessagesQueueSize()Gets outbound messages queue size.longgetReceivedBytesCount()Gets received bytes count.intgetReceivedMessagesCount()Gets received messages count.longgetSentBytesCount()Gets sent bytes count.intgetSentMessagesCount()Gets sent messages count.longgetStartTime()Returns the start time of the JVM in milliseconds.longgetTotalBusyTime()Gets total time this node spent executing jobs.intgetTotalCancelledJobs()Gets number of cancelled jobs since node startup.intgetTotalCpus()Returns the number of CPUs available to the Java Virtual Machine.intgetTotalExecutedJobs()Gets total number of jobs handled by the node since node startup.intgetTotalExecutedTasks()Gets total number of tasks handled by the node.longgetTotalIdleTime()Gets total time this node spent idling (not executing any jobs).longgetTotalJobsExecutionTime()Gets total time all finished jobs takes to execute on the node since node startup.intgetTotalNodes()Gets total number of nodes.intgetTotalRejectedJobs()Gets total number of jobs this node rejects during collision resolution operations since node startup.longgetTotalStartedThreadCount()Returns the total number of threads created and also started since the JVM started.longgetUpTime()Returns the uptime of the JVM in milliseconds.
 
- 
- 
- 
Method Detail- 
getLastUpdateTimelong getLastUpdateTime() Gets last update time of this node metrics.- Returns:
- Last update time.
 
 - 
getMaximumActiveJobsint getMaximumActiveJobs() Gets maximum number of jobs that ever ran concurrently on this node. Note that this different fromgetTotalExecutedJobs()metric and only reflects maximum number of jobs that ran at the same time.Note: all aggregated metrics like average, minimum, maximum, total, count are calculated over all the metrics kept in history. The history size is set via either one or both of configuration settings: - Returns:
- Maximum number of jobs that ever ran concurrently on this node.
 
 - 
getCurrentActiveJobsint getCurrentActiveJobs() Gets number of currently active jobs concurrently executing on the node.- Returns:
- Number of currently active jobs concurrently executing on the node.
 
 - 
getAverageActiveJobsfloat getAverageActiveJobs() Gets average number of active jobs concurrently executing on the node.Note: all aggregated metrics like average, minimum, maximum, total, count are calculated over all the metrics kept in history. The history size is set via either one or both of configuration settings: - Returns:
- Average number of active jobs.
 
 - 
getMaximumWaitingJobsint getMaximumWaitingJobs() Gets maximum number of waiting jobs this node had.Note: all aggregated metrics like average, minimum, maximum, total, count are calculated over all the metrics kept in history. The history size is set via either one or both of configuration settings: - Returns:
- Maximum number of waiting jobs.
 
 - 
getCurrentWaitingJobsint getCurrentWaitingJobs() Gets number of queued jobs currently waiting to be executed.- Returns:
- Number of queued jobs currently waiting to be executed.
 
 - 
getAverageWaitingJobsfloat getAverageWaitingJobs() Gets average number of waiting jobs this node had queued.Note: all aggregated metrics like average, minimum, maximum, total, count are calculated over all the metrics kept in history. The history size is set via either one or both of configuration settings: - Returns:
- Average number of waiting jobs.
 
 - 
getMaximumRejectedJobsint getMaximumRejectedJobs() Gets maximum number of jobs rejected at once during a single collision resolution operation.Note: all aggregated metrics like average, minimum, maximum, total, count are calculated over all the metrics kept in history. The history size is set via either one or both of configuration settings: - Returns:
- Maximum number of jobs rejected at once.
 
 - 
getCurrentRejectedJobsint getCurrentRejectedJobs() Gets number of jobs rejected after more recent collision resolution operation.- Returns:
- Number of jobs rejected after more recent collision resolution operation.
 
 - 
getAverageRejectedJobsfloat getAverageRejectedJobs() Gets average number of jobs this node rejects during collision resolution operations.Note: all aggregated metrics like average, minimum, maximum, total, count are calculated over all the metrics kept in history. The history size is set via either one or both of grid configuration settings: - Returns:
- Average number of jobs this node rejects during collision resolution operations.
 
 - 
getTotalRejectedJobsint getTotalRejectedJobs() Gets total number of jobs this node rejects during collision resolution operations since node startup.Note: Unlike most of other aggregation metrics this metric is not calculated over history but over the entire node life. - Returns:
- Total number of jobs this node rejects during collision resolution operations since node startup.
 
 - 
getMaximumCancelledJobsint getMaximumCancelledJobs() Gets maximum number of cancelled jobs this node ever had running concurrently.- Returns:
- Maximum number of cancelled jobs.
 
 - 
getCurrentCancelledJobsint getCurrentCancelledJobs() Gets number of cancelled jobs that are still running. Just like regular java threads, jobs will receive cancel notification, but it's ultimately up to the job itself to gracefully exit.- Returns:
- Number of cancelled jobs that are still running.
 
 - 
getAverageCancelledJobsfloat getAverageCancelledJobs() Gets average number of cancelled jobs this node ever had running concurrently.Note: all aggregated metrics like average, minimum, maximum, total, count are calculated over all the metrics kept in history. The history size is set via either one or both of configuration settings: - Returns:
- Average number of cancelled jobs.
 
 - 
getTotalCancelledJobsint getTotalCancelledJobs() Gets number of cancelled jobs since node startup.Note: Unlike most of other aggregation metrics this metric is not calculated over history but over the entire node life. - Returns:
- Total number of cancelled jobs since node startup.
 
 - 
getTotalExecutedJobsint getTotalExecutedJobs() Gets total number of jobs handled by the node since node startup.Note: Unlike most of other aggregation metrics this metric is not calculated over history but over the entire node life. - Returns:
- Total number of jobs handled by the node since node startup.
 
 - 
getTotalJobsExecutionTimelong getTotalJobsExecutionTime() Gets total time all finished jobs takes to execute on the node since node startup.Note: Unlike most of other aggregation metrics this metric is not calculated over history but over the entire node life. - Returns:
- Total jobs execution time.
 
 - 
getMaximumJobWaitTimelong getMaximumJobWaitTime() Gets maximum time a job ever spent waiting in a queue to be executed.Note: all aggregated metrics like average, minimum, maximum, total, count are calculated over all the metrics kept in history. The history size is set via either one or both of configuration settings: - Returns:
- Maximum waiting time.
 
 - 
getCurrentJobWaitTimelong getCurrentJobWaitTime() Gets current time an oldest jobs has spent waiting to be executed.- Returns:
- Current wait time of oldest job.
 
 - 
getAverageJobWaitTimedouble getAverageJobWaitTime() Gets average time jobs spend waiting in the queue to be executed.Note: all aggregated metrics like average, minimum, maximum, total, count are calculated over all the metrics kept in history. The history size is set via either one or both of configuration settings: - Returns:
- Average job wait time.
 
 - 
getMaximumJobExecuteTimelong getMaximumJobExecuteTime() Gets time it took to execute the longest job on the node.Note: all aggregated metrics like average, minimum, maximum, total, count are calculated over all the metrics kept in history. The history size is set via either one or both of configuration settings: - Returns:
- Time it took to execute the longest job on the node.
 
 - 
getCurrentJobExecuteTimelong getCurrentJobExecuteTime() Gets longest time a current job has been executing for.- Returns:
- Longest time a current job has been executing for.
 
 - 
getAverageJobExecuteTimedouble getAverageJobExecuteTime() Gets average time a job takes to execute on the node.Note: all aggregated metrics like average, minimum, maximum, total, count are calculated over all the metrics kept in history. The history size is set via either one or both of configuration settings: - Returns:
- Average job execution time.
 
 - 
getTotalExecutedTasksint getTotalExecutedTasks() Gets total number of tasks handled by the node.Note: all aggregated metrics like average, minimum, maximum, total, count are calculated over all the metrics kept in history. The history size is set via either one or both of configuration settings: - Returns:
- Total number of jobs handled by the node.
 
 - 
getTotalBusyTimelong getTotalBusyTime() Gets total time this node spent executing jobs.- Returns:
- Total time this node spent executing jobs.
 
 - 
getTotalIdleTimelong getTotalIdleTime() Gets total time this node spent idling (not executing any jobs).- Returns:
- Gets total time this node spent idling.
 
 - 
getCurrentIdleTimelong getCurrentIdleTime() Gets time this node spend idling since executing last job.- Returns:
- Time this node spend idling since executing last job.
 
 - 
getBusyTimePercentagefloat getBusyTimePercentage() Gets percentage of time this node is busy executing jobs vs. idling.- Returns:
- Percentage of time this node is busy (value is less than
      or equal to 1and greater than or equal to0)
 
 - 
getIdleTimePercentagefloat getIdleTimePercentage() Gets percentage of time this node is idling vs. executing jobs.- Returns:
- Percentage of time this node is idle (value is less than
      or equal to 1and greater than or equal to0)
 
 - 
getTotalCpusint getTotalCpus() Returns the number of CPUs available to the Java Virtual Machine. This method is equivalent to theRuntime.availableProcessors()method.Note that this value may change during successive invocations of the virtual machine. - Returns:
- The number of processors available to the virtual machine, never smaller than one.
 
 - 
getCurrentCpuLoaddouble getCurrentCpuLoad() Returns the CPU usage in[0, 1]range. The exact way how this number is calculated depends on SPI implementation.If the CPU usage is not available, a negative value is returned. This method is designed to provide a hint about the system load and may be queried frequently. The load average may be unavailable on some platform where it is expensive to implement this method. - Returns:
- The estimated CPU usage in [0, 1]range. Negative value if not available.
 
 - 
getAverageCpuLoaddouble getAverageCpuLoad() Gets average of CPU load values over all metrics kept in the history.Note: all aggregated metrics like average, minimum, maximum, total, count are calculated over all the metrics kept in history. The history size is set via either one or both of configuration settings: - Returns:
- Average of CPU load value in [0, 1]range over all metrics kept in the history.
 
 - 
getCurrentGcCpuLoaddouble getCurrentGcCpuLoad() Returns average time spent in CG since the last update.- Returns:
- Average time spent in CG since the last update.
 
 - 
getHeapMemoryInitializedlong getHeapMemoryInitialized() Returns the amount of heap memory in bytes that the JVM initially requests from the operating system for memory management. This method returns-1if the initial memory size is undefined.This value represents a setting of the heap memory for Java VM and is not a sum of all initial heap values for all memory pools. Note: this is not an aggregated metric and it's calculated from the time of the node's startup. - Returns:
- The initial size of memory in bytes; -1if undefined.
 
 - 
getHeapMemoryUsedlong getHeapMemoryUsed() Returns the current heap size that is used for object allocation. The heap consists of one or more memory pools. This value is the sum ofusedheap memory values of all heap memory pools.The amount of used memory in the returned is the amount of memory occupied by both live objects and garbage objects that have not been collected, if any. Note: this is not an aggregated metric and it's calculated from the time of the node's startup. - Returns:
- Amount of heap memory used.
 
 - 
getHeapMemoryCommittedlong getHeapMemoryCommitted() Returns the amount of heap memory in bytes that is committed for the JVM to use. This amount of memory is guaranteed for the JVM to use. The heap consists of one or more memory pools. This value is the sum ofcommittedheap memory values of all heap memory pools.Note: this is not an aggregated metric and it's calculated from the time of the node's startup. - Returns:
- The amount of committed memory in bytes.
 
 - 
getHeapMemoryMaximumlong getHeapMemoryMaximum() Returns the maximum amount of heap memory in bytes that can be used for memory management. This method returns-1if the maximum memory size is undefined.This amount of memory is not guaranteed to be available for memory management if it is greater than the amount of committed memory. The JVM may fail to allocate memory even if the amount of used memory does not exceed this maximum size. This value represents a setting of the heap memory for Java VM and is not a sum of all initial heap values for all memory pools. Note: this is not an aggregated metric and it's calculated from the time of the node's startup. - Returns:
- The maximum amount of memory in bytes; -1if undefined.
 
 - 
getHeapMemoryTotallong getHeapMemoryTotal() Returns the total amount of heap memory in bytes. This method returns-1if the total memory size is undefined.This amount of memory is not guaranteed to be available for memory management if it is greater than the amount of committed memory. The JVM may fail to allocate memory even if the amount of used memory does not exceed this maximum size. This value represents a setting of the heap memory for Java VM and is not a sum of all initial heap values for all memory pools. Note: this is not an aggregated metric and it's calculated from the time of the node's startup. - Returns:
- The total amount of memory in bytes; -1if undefined.
 
 - 
getNonHeapMemoryInitializedlong getNonHeapMemoryInitialized() Returns the amount of non-heap memory in bytes that the JVM initially requests from the operating system for memory management. This method returns-1if the initial memory size is undefined.This value represents a setting of non-heap memory for Java VM and is not a sum of all initial heap values for all memory pools. Note: this is not an aggregated metric and it's calculated from the time of the node's startup. - Returns:
- The initial size of memory in bytes; -1if undefined.
 
 - 
getNonHeapMemoryUsedlong getNonHeapMemoryUsed() Returns the current non-heap memory size that is used by Java VM. The non-heap memory consists of one or more memory pools. This value is the sum ofusednon-heap memory values of all non-heap memory pools.Note: this is not an aggregated metric and it's calculated from the time of the node's startup. Note: this is not an aggregated metric and it's calculated from the time of the node's startup. - Returns:
- Amount of none-heap memory used.
 
 - 
getNonHeapMemoryCommittedlong getNonHeapMemoryCommitted() Returns the amount of non-heap memory in bytes that is committed for the JVM to use. This amount of memory is guaranteed for the JVM to use. The non-heap memory consists of one or more memory pools. This value is the sum ofcommittednon-heap memory values of all non-heap memory pools.Note: this is not an aggregated metric and it's calculated from the time of the node's startup. - Returns:
- The amount of committed memory in bytes.
 
 - 
getNonHeapMemoryMaximumlong getNonHeapMemoryMaximum() Returns the maximum amount of non-heap memory in bytes that can be used for memory management. This method returns-1if the maximum memory size is undefined.This amount of memory is not guaranteed to be available for memory management if it is greater than the amount of committed memory. The JVM may fail to allocate memory even if the amount of used memory does not exceed this maximum size. This value represents a setting of the non-heap memory for Java VM and is not a sum of all initial non-heap values for all memory pools. Note: this is not an aggregated metric and it's calculated from the time of the node's startup. - Returns:
- The maximum amount of memory in bytes; -1if undefined.
 
 - 
getNonHeapMemoryTotallong getNonHeapMemoryTotal() Returns the total amount of non-heap memory in bytes that can be used for memory management. This method returns-1if the total memory size is undefined.This amount of memory is not guaranteed to be available for memory management if it is greater than the amount of committed memory. The JVM may fail to allocate memory even if the amount of used memory does not exceed this maximum size. This value represents a setting of the non-heap memory for Java VM and is not a sum of all initial non-heap values for all memory pools. Note: this is not an aggregated metric and it's calculated from the time of the node's startup. - Returns:
- The total amount of memory in bytes; -1if undefined.
 
 - 
getUpTimelong getUpTime() Returns the uptime of the JVM in milliseconds.- Returns:
- Uptime of the JVM in milliseconds.
 
 - 
getStartTimelong getStartTime() Returns the start time of the JVM in milliseconds. This method returns the approximate time when the Java virtual machine started.- Returns:
- Start time of the JVM in milliseconds.
 
 - 
getNodeStartTimelong getNodeStartTime() Returns the start time of grid node in milliseconds. There can be several grid nodes started in one JVM, so JVM start time will be the same for all of them, but node start time will be different.- Returns:
- Start time of the grid node in milliseconds.
 
 - 
getCurrentThreadCountint getCurrentThreadCount() Returns the current number of live threads including both daemon and non-daemon threads.- Returns:
- Current number of live threads.
 
 - 
getMaximumThreadCountint getMaximumThreadCount() Returns the maximum live thread count since the JVM started or peak was reset.Note: this is not an aggregated metric and it's calculated from the time of the node's startup. - Returns:
- The peak live thread count.
 
 - 
getTotalStartedThreadCountlong getTotalStartedThreadCount() Returns the total number of threads created and also started since the JVM started.Note: this is not an aggregated metric and it's calculated from the time of the node's startup. - Returns:
- The total number of threads started.
 
 - 
getCurrentDaemonThreadCountint getCurrentDaemonThreadCount() Returns the current number of live daemon threads.- Returns:
- Current number of live daemon threads.
 
 - 
getLastDataVersionlong getLastDataVersion() In-Memory Data Grid assigns incremental versions to all cache operations. This method provides the latest data version on the node.- Returns:
- Last data version.
 
 - 
getSentMessagesCountint getSentMessagesCount() Gets sent messages count.- Returns:
- Sent messages count.
 
 - 
getSentBytesCountlong getSentBytesCount() Gets sent bytes count.- Returns:
- Sent bytes count.
 
 - 
getReceivedMessagesCountint getReceivedMessagesCount() Gets received messages count.- Returns:
- Received messages count.
 
 - 
getReceivedBytesCountlong getReceivedBytesCount() Gets received bytes count.- Returns:
- Received bytes count.
 
 - 
getOutboundMessagesQueueSizeint getOutboundMessagesQueueSize() Gets outbound messages queue size.- Returns:
- Outbound messages queue size.
 
 - 
getTotalNodesint getTotalNodes() Gets total number of nodes.- Returns:
- Total number of nodes.
 
 - 
getCurrentPmeDurationlong getCurrentPmeDuration() Gets execution duration for current partition map exchange in milliseconds.- Returns:
- Gets execution duration for current partition map exchange in milliseconds. 0if there is no running PME.
 
 
- 
 
-