ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject ignite git commit: IGNITE-6869 Implement new JMX metric for jobs monitoring
Date Tue, 21 Nov 2017 10:39:34 GMT
Repository: ignite
Updated Branches:
  refs/heads/master 31055f217 -> 0295518ba


IGNITE-6869 Implement new JMX metric for jobs monitoring

Signed-off-by: Anton Vinogradov <av@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/0295518b
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/0295518b
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/0295518b

Branch: refs/heads/master
Commit: 0295518bac9f9431351f8f7e7b9d2148ee70417d
Parents: 31055f2
Author: Aleksey Plekhanov <Plehanov.Alex@gmail.com>
Authored: Tue Nov 21 13:39:20 2017 +0300
Committer: Anton Vinogradov <av@apache.org>
Committed: Tue Nov 21 13:39:20 2017 +0300

----------------------------------------------------------------------
 .../apache/ignite/cluster/ClusterMetrics.java   |  12 +-
 .../ClusterLocalNodeMetricsMXBeanImpl.java      |  11 +-
 .../internal/ClusterMetricsMXBeanImpl.java      | 360 +++++++++++++++++++
 .../ignite/internal/ClusterMetricsSnapshot.java |  37 +-
 .../apache/ignite/internal/IgniteKernal.java    |  40 ++-
 .../discovery/GridDiscoveryManager.java         |   1 +
 .../processors/jobmetrics/GridJobMetrics.java   |  21 +-
 .../jobmetrics/GridJobMetricsProcessor.java     |   9 +-
 .../mxbean/ClusterLocalNodeMetricsMXBean.java   | 253 -------------
 .../ignite/mxbean/ClusterMetricsMXBean.java     | 257 +++++++++++++
 .../internal/ClusterNodeMetricsSelfTest.java    |   4 +-
 ...ClusterMetricsSnapshotSerializeSelfTest.java |   8 +-
 12 files changed, 734 insertions(+), 279 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/0295518b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterMetrics.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterMetrics.java b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterMetrics.java
index 7dd4707..74e98b8 100644
--- a/modules/core/src/main/java/org/apache/ignite/cluster/ClusterMetrics.java
+++ b/modules/core/src/main/java/org/apache/ignite/cluster/ClusterMetrics.java
@@ -225,6 +225,16 @@ public interface ClusterMetrics {
     public int getTotalExecutedJobs();
 
     /**
+     * Gets total time all finished jobs takes to execute on the node since node startup.
+     * <p>
+     * <b>Note:</b> Unlike most of other aggregation metrics this metric is not calculated over history
+     * but over the entire node life.
+     *
+     * @return Total jobs execution time.
+     */
+    public long getTotalJobsExecutionTime();
+
+    /**
      * Gets maximum time a job ever spent waiting in a queue to be executed.
      * <p>
      * <b>Note:</b> all aggregated metrics like average, minimum, maximum, total, count are
@@ -684,4 +694,4 @@ public interface ClusterMetrics {
      * @return Total number of nodes.
      */
     public int getTotalNodes();
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/0295518b/modules/core/src/main/java/org/apache/ignite/internal/ClusterLocalNodeMetricsMXBeanImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/ClusterLocalNodeMetricsMXBeanImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/ClusterLocalNodeMetricsMXBeanImpl.java
index ef81c6a..263c20a 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/ClusterLocalNodeMetricsMXBeanImpl.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/ClusterLocalNodeMetricsMXBeanImpl.java
@@ -19,12 +19,12 @@ package org.apache.ignite.internal;
 
 import org.apache.ignite.cluster.ClusterNode;
 import org.apache.ignite.internal.util.typedef.internal.S;
-import org.apache.ignite.mxbean.ClusterLocalNodeMetricsMXBean;
+import org.apache.ignite.mxbean.ClusterMetricsMXBean;
 
 /**
  * Local node metrics MBean.
  */
-public class ClusterLocalNodeMetricsMXBeanImpl implements ClusterLocalNodeMetricsMXBean {
+public class ClusterLocalNodeMetricsMXBeanImpl implements ClusterMetricsMXBean {
     /** Grid node. */
     private final ClusterNode node;
 
@@ -263,6 +263,11 @@ public class ClusterLocalNodeMetricsMXBeanImpl implements ClusterLocalNodeMetric
     }
 
     /** {@inheritDoc} */
+    @Override public long getTotalJobsExecutionTime() {
+        return node.metrics().getTotalJobsExecutionTime();
+    }
+
+    /** {@inheritDoc} */
     @Override public long getTotalIdleTime() {
         return node.metrics().getTotalIdleTime();
     }
@@ -321,4 +326,4 @@ public class ClusterLocalNodeMetricsMXBeanImpl implements ClusterLocalNodeMetric
     @Override public String toString() {
         return S.toString(ClusterLocalNodeMetricsMXBeanImpl.class, this);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/0295518b/modules/core/src/main/java/org/apache/ignite/internal/ClusterMetricsMXBeanImpl.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/ClusterMetricsMXBeanImpl.java b/modules/core/src/main/java/org/apache/ignite/internal/ClusterMetricsMXBeanImpl.java
new file mode 100644
index 0000000..de4e405
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/internal/ClusterMetricsMXBeanImpl.java
@@ -0,0 +1,360 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal;
+
+import org.apache.ignite.cluster.ClusterGroup;
+import org.apache.ignite.cluster.ClusterMetrics;
+import org.apache.ignite.internal.util.typedef.internal.S;
+import org.apache.ignite.mxbean.ClusterMetricsMXBean;
+
+/**
+ * Cluster metrics MBean.
+ */
+public class ClusterMetricsMXBeanImpl implements ClusterMetricsMXBean {
+    /** Grid cluster. */
+    private final ClusterGroup cluster;
+
+    /** Cached value of cluster metrics. */
+    private volatile ClusterMetrics clusterMetricsSnapshot;
+
+    /** Cluster metrics expire time. */
+    private volatile long clusterMetricsExpireTime;
+
+    /** Cluster metrics update mutex. */
+    private final Object clusterMetricsMux = new Object();
+
+    /**
+     * @param cluster Cluster group to manage.
+     */
+    public ClusterMetricsMXBeanImpl(ClusterGroup cluster) {
+        assert cluster != null;
+
+        this.cluster = cluster;
+    }
+
+    /**
+     * Gets a metrics snapshot for this cluster group.
+     *
+     * @return Metrics snapshot.
+     */
+    private ClusterMetrics metrics() {
+        if (clusterMetricsExpireTime < System.currentTimeMillis()) {
+            synchronized (clusterMetricsMux) {
+                if (clusterMetricsExpireTime < System.currentTimeMillis()) {
+                    clusterMetricsSnapshot = cluster.metrics();
+
+                    clusterMetricsExpireTime = System.currentTimeMillis()
+                        + cluster.ignite().configuration().getMetricsUpdateFrequency();
+                }
+            }
+        }
+
+        return clusterMetricsSnapshot;
+    }
+
+    /** {@inheritDoc} */
+    @Override public int getTotalCpus() {
+        return metrics().getTotalCpus();
+    }
+
+    /** {@inheritDoc} */
+    @Override public float getAverageActiveJobs() {
+        return metrics().getAverageActiveJobs();
+    }
+
+    /** {@inheritDoc} */
+    @Override public float getAverageCancelledJobs() {
+        return metrics().getAverageCancelledJobs();
+    }
+
+    /** {@inheritDoc} */
+    @Override public double getAverageJobExecuteTime() {
+        return metrics().getAverageJobExecuteTime();
+    }
+
+    /** {@inheritDoc} */
+    @Override public double getAverageJobWaitTime() {
+        return metrics().getAverageJobWaitTime();
+    }
+
+    /** {@inheritDoc} */
+    @Override public float getAverageRejectedJobs() {
+        return metrics().getAverageRejectedJobs();
+    }
+
+    /** {@inheritDoc} */
+    @Override public float getAverageWaitingJobs() {
+        return metrics().getAverageWaitingJobs();
+    }
+
+    /** {@inheritDoc} */
+    @Override public float getBusyTimePercentage() {
+        return metrics().getBusyTimePercentage() * 100;
+    }
+
+    /** {@inheritDoc} */
+    @Override public int getCurrentActiveJobs() {
+        return metrics().getCurrentActiveJobs();
+    }
+
+    /** {@inheritDoc} */
+    @Override public int getCurrentCancelledJobs() {
+        return metrics().getCurrentCancelledJobs();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getCurrentIdleTime() {
+        return metrics().getCurrentIdleTime();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getCurrentJobExecuteTime() {
+        return metrics().getCurrentJobExecuteTime();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getCurrentJobWaitTime() {
+        return metrics().getCurrentJobWaitTime();
+    }
+
+    /** {@inheritDoc} */
+    @Override public int getCurrentRejectedJobs() {
+        return metrics().getCurrentRejectedJobs();
+    }
+
+    /** {@inheritDoc} */
+    @Override public int getCurrentWaitingJobs() {
+        return metrics().getCurrentWaitingJobs();
+    }
+
+    /** {@inheritDoc} */
+    @Override public int getTotalExecutedTasks() {
+        return metrics().getTotalExecutedTasks();
+    }
+
+    /** {@inheritDoc} */
+    @Override public int getCurrentDaemonThreadCount() {
+        return metrics().getCurrentDaemonThreadCount();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getHeapMemoryCommitted() {
+        return metrics().getHeapMemoryCommitted();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getHeapMemoryInitialized() {
+        return metrics().getHeapMemoryInitialized();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getHeapMemoryMaximum() {
+        return metrics().getHeapMemoryMaximum();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getHeapMemoryTotal() {
+        return metrics().getHeapMemoryTotal();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getHeapMemoryUsed() {
+        return metrics().getHeapMemoryUsed();
+    }
+
+    /** {@inheritDoc} */
+    @Override public float getIdleTimePercentage() {
+        return metrics().getIdleTimePercentage() * 100;
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getLastUpdateTime() {
+        return metrics().getLastUpdateTime();
+    }
+
+    /** {@inheritDoc} */
+    @Override public int getMaximumActiveJobs() {
+        return metrics().getMaximumActiveJobs();
+    }
+
+    /** {@inheritDoc} */
+    @Override public int getMaximumCancelledJobs() {
+        return metrics().getMaximumCancelledJobs();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getMaximumJobExecuteTime() {
+        return metrics().getMaximumJobExecuteTime();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getMaximumJobWaitTime() {
+        return metrics().getMaximumJobWaitTime();
+    }
+
+    /** {@inheritDoc} */
+    @Override public int getMaximumRejectedJobs() {
+        return metrics().getMaximumRejectedJobs();
+    }
+
+    /** {@inheritDoc} */
+    @Override public int getMaximumWaitingJobs() {
+        return metrics().getMaximumWaitingJobs();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getNonHeapMemoryCommitted() {
+        return metrics().getNonHeapMemoryCommitted();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getNonHeapMemoryInitialized() {
+        return metrics().getNonHeapMemoryInitialized();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getNonHeapMemoryMaximum() {
+        return metrics().getNonHeapMemoryMaximum();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getNonHeapMemoryTotal() {
+        return metrics().getNonHeapMemoryTotal();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getNonHeapMemoryUsed() {
+        return metrics().getNonHeapMemoryUsed();
+    }
+
+    /** {@inheritDoc} */
+    @Override public int getMaximumThreadCount() {
+        return metrics().getMaximumThreadCount();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getStartTime() {
+        return metrics().getStartTime();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getNodeStartTime() {
+        return metrics().getNodeStartTime();
+    }
+
+    /** {@inheritDoc} */
+    @Override public double getCurrentCpuLoad() {
+        return metrics().getCurrentCpuLoad() * 100;
+    }
+
+    /** {@inheritDoc} */
+    @Override public double getAverageCpuLoad() {
+        return metrics().getAverageCpuLoad() * 100;
+    }
+
+    /** {@inheritDoc} */
+    @Override public double getCurrentGcCpuLoad() {
+        return metrics().getCurrentGcCpuLoad() * 100;
+    }
+
+    /** {@inheritDoc} */
+    @Override public int getCurrentThreadCount() {
+        return metrics().getCurrentThreadCount();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getTotalBusyTime() {
+        return metrics().getTotalBusyTime();
+    }
+
+    /** {@inheritDoc} */
+    @Override public int getTotalCancelledJobs() {
+        return metrics().getTotalCancelledJobs();
+    }
+
+    /** {@inheritDoc} */
+    @Override public int getTotalExecutedJobs() {
+        return metrics().getTotalExecutedJobs();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getTotalJobsExecutionTime() {
+        return metrics().getTotalJobsExecutionTime();
+    }
+
+
+    /** {@inheritDoc} */
+    @Override public long getTotalIdleTime() {
+        return metrics().getTotalIdleTime();
+    }
+
+    /** {@inheritDoc} */
+    @Override public int getTotalRejectedJobs() {
+        return metrics().getTotalRejectedJobs();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getTotalStartedThreadCount() {
+        return metrics().getTotalStartedThreadCount();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getUpTime() {
+        return metrics().getUpTime();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getLastDataVersion() {
+        return metrics().getLastDataVersion();
+    }
+
+    /** {@inheritDoc} */
+    @Override public int getSentMessagesCount() {
+        return metrics().getSentMessagesCount();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getSentBytesCount() {
+        return metrics().getSentBytesCount();
+    }
+
+    /** {@inheritDoc} */
+    @Override public int getReceivedMessagesCount() {
+        return metrics().getReceivedMessagesCount();
+    }
+
+    /** {@inheritDoc} */
+    @Override public long getReceivedBytesCount() {
+        return metrics().getReceivedBytesCount();
+    }
+
+    /** {@inheritDoc} */
+    @Override public int getOutboundMessagesQueueSize() {
+        return metrics().getOutboundMessagesQueueSize();
+    }
+
+    /** {@inheritDoc} */
+    @Override public int getTotalNodes() {
+        return metrics().getTotalNodes();
+    }
+
+    /** {@inheritDoc} */
+    @Override public String toString() {
+        return S.toString(ClusterMetricsMXBeanImpl.class, this);
+    }
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/0295518b/modules/core/src/main/java/org/apache/ignite/internal/ClusterMetricsSnapshot.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/ClusterMetricsSnapshot.java b/modules/core/src/main/java/org/apache/ignite/internal/ClusterMetricsSnapshot.java
index 8a0bc5e..5f29167 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/ClusterMetricsSnapshot.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/ClusterMetricsSnapshot.java
@@ -90,8 +90,9 @@ public class ClusterMetricsSnapshot implements ClusterMetrics {
         8/*sent bytes count*/ +
         4/*received messages count*/ +
         8/*received bytes count*/ +
-        4/*outbound messages queue size*/ + 
-        4/*total nodes*/;
+        4/*outbound messages queue size*/ +
+        4/*total nodes*/ +
+        8/*total jobs execution time*/;
 
     /** */
     private long lastUpdateTime = -1;
@@ -252,6 +253,9 @@ public class ClusterMetricsSnapshot implements ClusterMetrics {
     /** */
     private int totalNodes = -1;
 
+    /** */
+    private long totalJobsExecTime = -1;
+
     /**
      * Create empty snapshot.
      */
@@ -288,6 +292,7 @@ public class ClusterMetricsSnapshot implements ClusterMetrics {
         totalRejectedJobs = 0;
         totalCancelledJobs = 0;
         totalExecutedJobs = 0;
+        totalJobsExecTime = 0;
         maxJobWaitTime = 0;
         avgJobWaitTime = 0;
         maxJobExecTime = 0;
@@ -334,6 +339,7 @@ public class ClusterMetricsSnapshot implements ClusterMetrics {
             maxActiveJobs = max(maxActiveJobs, m.getCurrentActiveJobs());
             avgActiveJobs += m.getCurrentActiveJobs();
             totalExecutedJobs += m.getTotalExecutedJobs();
+            totalJobsExecTime += m.getTotalJobsExecutionTime();
 
             totalExecTasks += m.getTotalExecutedTasks();
 
@@ -651,6 +657,20 @@ public class ClusterMetricsSnapshot implements ClusterMetrics {
     }
 
     /** {@inheritDoc} */
+    @Override public long getTotalJobsExecutionTime() {
+        return totalJobsExecTime;
+    }
+
+    /**
+     * Sets total jobs execution time.
+     *
+     * @param totalJobsExecTime Total jobs execution time.
+     */
+    public void setTotalJobsExecutionTime(long totalJobsExecTime) {
+        this.totalJobsExecTime = totalJobsExecTime;
+    }
+
+    /** {@inheritDoc} */
     @Override public int getTotalCancelledJobs() {
         return totalCancelledJobs;
     }
@@ -1325,6 +1345,7 @@ public class ClusterMetricsSnapshot implements ClusterMetrics {
         buf.putLong(metrics.getReceivedBytesCount());
         buf.putInt(metrics.getOutboundMessagesQueueSize());
         buf.putInt(metrics.getTotalNodes());
+        buf.putLong(metrics.getTotalJobsExecutionTime());
 
         assert !buf.hasRemaining() : "Invalid metrics size [expected=" + METRICS_SIZE + ", actual="
             + (buf.position() - off) + ']';
@@ -1342,7 +1363,9 @@ public class ClusterMetricsSnapshot implements ClusterMetrics {
     public static ClusterMetrics deserialize(byte[] data, int off) {
         ClusterMetricsSnapshot metrics = new ClusterMetricsSnapshot();
 
-        ByteBuffer buf = ByteBuffer.wrap(data, off, METRICS_SIZE);
+        int bufSize = min(METRICS_SIZE, data.length - off);
+
+        ByteBuffer buf = ByteBuffer.wrap(data, off, bufSize);
 
         metrics.setLastUpdateTime(U.currentTimeMillis());
 
@@ -1399,6 +1422,12 @@ public class ClusterMetricsSnapshot implements ClusterMetrics {
         metrics.setOutboundMessagesQueueSize(buf.getInt());
         metrics.setTotalNodes(buf.getInt());
 
+        // For compatibility with metrics serialized by old ignite versions.
+        if (buf.remaining() >= 8)
+            metrics.setTotalJobsExecutionTime(buf.getLong());
+        else
+            metrics.setTotalJobsExecutionTime(0);
+
         return metrics;
     }
 
@@ -1406,4 +1435,4 @@ public class ClusterMetricsSnapshot implements ClusterMetrics {
     @Override public String toString() {
         return S.toString(ClusterMetricsSnapshot.class, this);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/0295518b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
index bde7be2..d3793ae 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/IgniteKernal.java
@@ -182,7 +182,7 @@ import org.apache.ignite.lifecycle.LifecycleBean;
 import org.apache.ignite.lifecycle.LifecycleEventType;
 import org.apache.ignite.marshaller.MarshallerExclusions;
 import org.apache.ignite.marshaller.jdk.JdkMarshaller;
-import org.apache.ignite.mxbean.ClusterLocalNodeMetricsMXBean;
+import org.apache.ignite.mxbean.ClusterMetricsMXBean;
 import org.apache.ignite.mxbean.IgniteMXBean;
 import org.apache.ignite.mxbean.StripedExecutorMXBean;
 import org.apache.ignite.mxbean.ThreadPoolMXBean;
@@ -303,6 +303,10 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
 
     /** */
     @GridToStringExclude
+    private ObjectName allNodesMBean;
+
+    /** */
+    @GridToStringExclude
     private ObjectName pubExecSvcMBean;
 
     /** */
@@ -1079,7 +1083,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
 
             // Register MBeans.
             registerKernalMBean();
-            registerLocalNodeMBean();
+            registerClusterMetricsMBeans();
             registerExecutorMBeans(execSvc, sysExecSvc, p2pExecSvc, mgmtExecSvc, restExecSvc, qryExecSvc,
                 schemaExecSvc);
 
@@ -1696,32 +1700,43 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
         }
     }
 
-    /** @throws IgniteCheckedException If registration failed. */
-    private void registerLocalNodeMBean() throws IgniteCheckedException {
+    /**
+     * Register instance of ClusterMetricsMBean.
+     *
+     * @param mbean MBean instance to register.
+     * @throws IgniteCheckedException If registration failed.
+     */
+    private ObjectName registerClusterMetricsMBean(ClusterMetricsMXBean mbean) throws IgniteCheckedException {
         if(U.IGNITE_MBEANS_DISABLED)
-            return;
+            return null;
 
-        ClusterLocalNodeMetricsMXBean mbean = new ClusterLocalNodeMetricsMXBeanImpl(ctx.discovery().localNode());
+        ObjectName objectName;
 
         try {
-            locNodeMBean = U.registerMBean(
+            objectName = U.registerMBean(
                 cfg.getMBeanServer(),
                 cfg.getIgniteInstanceName(),
                 "Kernal",
                 mbean.getClass().getSimpleName(),
                 mbean,
-                ClusterLocalNodeMetricsMXBean.class);
+                ClusterMetricsMXBean.class);
 
             if (log.isDebugEnabled())
-                log.debug("Registered local node MBean: " + locNodeMBean);
+                log.debug("Registered MBean: " + objectName);
+
+            return objectName;
         }
         catch (JMException e) {
-            locNodeMBean = null;
-
-            throw new IgniteCheckedException("Failed to register local node MBean.", e);
+            throw new IgniteCheckedException("Failed to register MBean: " + mbean.getClass().getSimpleName(), e);
         }
     }
 
+    /** @throws IgniteCheckedException If registration failed. */
+    private void registerClusterMetricsMBeans() throws IgniteCheckedException {
+        locNodeMBean = registerClusterMetricsMBean(new ClusterLocalNodeMetricsMXBeanImpl(ctx.discovery().localNode()));
+        allNodesMBean = registerClusterMetricsMBean(new ClusterMetricsMXBeanImpl(cluster()));
+    }
+
     /**
      * @param execSvc Public executor service.
      * @param sysExecSvc System executor service.
@@ -2271,6 +2286,7 @@ public class IgniteKernal implements IgniteEx, IgniteMXBean, Externalizable {
                     unregisterMBean(p2PExecSvcMBean) &
                     unregisterMBean(kernalMBean) &
                     unregisterMBean(locNodeMBean) &
+                    unregisterMBean(allNodesMBean) &
                     unregisterMBean(restExecSvcMBean) &
                     unregisterMBean(qryExecSvcMBean) &
                     unregisterMBean(schemaExecSvcMBean) &

http://git-wip-us.apache.org/repos/asf/ignite/blob/0295518b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
index a6737dc..3c7df92 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java
@@ -1065,6 +1065,7 @@ public class GridDiscoveryManager extends GridManagerAdapter<DiscoverySpi> {
                 nm.setTotalRejectedJobs(jm.getTotalRejectedJobs());
                 nm.setTotalCancelledJobs(jm.getTotalCancelledJobs());
                 nm.setTotalExecutedJobs(jm.getTotalExecutedJobs());
+                nm.setTotalJobsExecutionTime(jm.getTotalJobsExecutionTime());
                 nm.setMaximumJobWaitTime(jm.getMaximumJobWaitTime());
                 nm.setCurrentJobWaitTime(jm.getCurrentJobWaitTime());
                 nm.setAverageJobWaitTime(jm.getAverageJobWaitTime());

http://git-wip-us.apache.org/repos/asf/ignite/blob/0295518b/modules/core/src/main/java/org/apache/ignite/internal/processors/jobmetrics/GridJobMetrics.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/jobmetrics/GridJobMetrics.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/jobmetrics/GridJobMetrics.java
index 2ad8ca7..1700ad9 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/jobmetrics/GridJobMetrics.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/jobmetrics/GridJobMetrics.java
@@ -87,6 +87,9 @@ public class GridJobMetrics {
     private double avgJobExecTime;
 
     /** */
+    private long totalJobExecTime;
+
+    /** */
     private long totalIdleTime;
 
     /** */
@@ -247,6 +250,15 @@ public class GridJobMetrics {
     }
 
     /**
+     * Gets total jobs execution time.
+     *
+     * @return Total jobs execution time.
+     */
+    public long getTotalJobsExecutionTime() {
+        return totalJobExecTime;
+    }
+
+    /**
      * Gets total idle time.
      *
      * @return Total idle time.
@@ -421,6 +433,13 @@ public class GridJobMetrics {
     }
 
     /**
+     * @param totalJobExecTime The totalJobExecTime to set.
+     */
+    public void setTotalJobsExecutionTime(long totalJobExecTime) {
+        this.totalJobExecTime = totalJobExecTime;
+    }
+
+    /**
      * @param totalIdleTime The totalIdleTime to set.
      */
     void setTotalIdleTime(long totalIdleTime) {
@@ -445,4 +464,4 @@ public class GridJobMetrics {
     @Override public String toString() {
         return S.toString(GridJobMetrics.class, this);
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/0295518b/modules/core/src/main/java/org/apache/ignite/internal/processors/jobmetrics/GridJobMetricsProcessor.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/processors/jobmetrics/GridJobMetricsProcessor.java b/modules/core/src/main/java/org/apache/ignite/internal/processors/jobmetrics/GridJobMetricsProcessor.java
index c40cfda..5422310 100644
--- a/modules/core/src/main/java/org/apache/ignite/internal/processors/jobmetrics/GridJobMetricsProcessor.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/processors/jobmetrics/GridJobMetricsProcessor.java
@@ -238,6 +238,9 @@ public class GridJobMetricsProcessor extends GridProcessorAdapter {
         /** */
         private int totalRejectedJobs;
 
+        /** */
+        private long totalExecTime;
+
         /**
          * @param size Size (should be power of 2).
          */
@@ -258,6 +261,7 @@ public class GridJobMetricsProcessor extends GridProcessorAdapter {
             totalFinishedJobs += s.getFinishedJobs();
             totalCancelledJobs += s.getCancelJobs();
             totalRejectedJobs += s.getRejectJobs();
+            totalExecTime += s.getExecutionTime();
         }
 
         /**
@@ -277,7 +281,7 @@ public class GridJobMetricsProcessor extends GridProcessorAdapter {
                 rdc.collect(s);
             }
 
-            rdc.collectTotals(totalFinishedJobs, totalCancelledJobs, totalRejectedJobs);
+            rdc.collectTotals(totalFinishedJobs, totalCancelledJobs, totalRejectedJobs, totalExecTime);
         }
     }
 
@@ -371,11 +375,12 @@ public class GridJobMetricsProcessor extends GridProcessorAdapter {
          * @param totalCancelledJobs Cancelled jobs.
          * @param totalRejectedJobs Rejected jobs.
          */
-        void collectTotals(int totalFinishedJobs, int totalCancelledJobs, int totalRejectedJobs) {
+        void collectTotals(int totalFinishedJobs, int totalCancelledJobs, int totalRejectedJobs, long totalExecTime) {
             // Totals.
             m.setTotalExecutedJobs(m.getTotalExecutedJobs() + totalFinishedJobs);
             m.setTotalCancelledJobs(m.getTotalCancelledJobs() + totalCancelledJobs);
             m.setTotalRejectedJobs(m.getTotalRejectedJobs() + totalRejectedJobs);
+            m.setTotalJobsExecutionTime(m.getTotalJobsExecutionTime() + totalExecTime);
         }
 
         /** {@inheritDoc} */

http://git-wip-us.apache.org/repos/asf/ignite/blob/0295518b/modules/core/src/main/java/org/apache/ignite/mxbean/ClusterLocalNodeMetricsMXBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/mxbean/ClusterLocalNodeMetricsMXBean.java b/modules/core/src/main/java/org/apache/ignite/mxbean/ClusterLocalNodeMetricsMXBean.java
deleted file mode 100644
index ea3a57a..0000000
--- a/modules/core/src/main/java/org/apache/ignite/mxbean/ClusterLocalNodeMetricsMXBean.java
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.ignite.mxbean;
-
-import org.apache.ignite.cluster.ClusterMetrics;
-
-/**
- * MBean for local node metrics.
- */
-@MXBeanDescription("MBean that provides access to all local node metrics.")
-public interface ClusterLocalNodeMetricsMXBean extends ClusterMetrics {
-    /** {@inheritDoc} */
-    @MXBeanDescription("Last update time of this node metrics.")
-    public long getLastUpdateTime();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Maximum number of jobs that ever ran concurrently on this node.")
-    public int getMaximumActiveJobs();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Number of currently active jobs concurrently executing on the node.")
-    public int getCurrentActiveJobs();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Average number of active jobs concurrently executing on the node.")
-    public float getAverageActiveJobs();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Maximum number of waiting jobs this node had.")
-    public int getMaximumWaitingJobs();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Number of queued jobs currently waiting to be executed.")
-    public int getCurrentWaitingJobs();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Average number of waiting jobs this node had queued.")
-    public float getAverageWaitingJobs();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Maximum number of jobs rejected at once during a single collision resolution operation.")
-    public int getMaximumRejectedJobs();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Number of jobs rejected after more recent collision resolution operation.")
-    public int getCurrentRejectedJobs();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Average number of jobs this node rejects during collision resolution operations.")
-    public float getAverageRejectedJobs();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription(
-        "Total number of jobs this node rejects during collision resolution operations since node startup.")
-    public int getTotalRejectedJobs();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Maximum number of cancelled jobs this node ever had running concurrently.")
-    public int getMaximumCancelledJobs();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Number of cancelled jobs that are still running.")
-    public int getCurrentCancelledJobs();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Average number of cancelled jobs this node ever had running concurrently.")
-    public float getAverageCancelledJobs();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Total number of cancelled jobs since node startup.")
-    public int getTotalCancelledJobs();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Total number of jobs handled by the node.")
-    public int getTotalExecutedJobs();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Maximum time a job ever spent waiting in a queue to be executed.")
-    public long getMaximumJobWaitTime();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Current wait time of oldest job.")
-    public long getCurrentJobWaitTime();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Average time jobs spend waiting in the queue to be executed.")
-    public double getAverageJobWaitTime();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Time it took to execute the longest job on the node.")
-    public long getMaximumJobExecuteTime();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Longest time a current job has been executing for.")
-    public long getCurrentJobExecuteTime();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Average time a job takes to execute on the node.")
-    public double getAverageJobExecuteTime();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Total number of tasks handled by the node.")
-    public int getTotalExecutedTasks();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Total time this node spent executing jobs.")
-    public long getTotalBusyTime();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Total time this node spent idling (not executing any jobs).")
-    public long getTotalIdleTime();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Time this node spend idling since executing last job.")
-    public long getCurrentIdleTime();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Percentage of time this node is busy executing jobs vs. idling.")
-    public float getBusyTimePercentage();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Percentage of time this node is idling vs. executing jobs.")
-    public float getIdleTimePercentage();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("The number of CPUs available to the Java Virtual Machine.")
-    public int getTotalCpus();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("The system load average; or a negative value if not available.")
-    public double getCurrentCpuLoad();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Average of CPU load values over all metrics kept in the history.")
-    public double getAverageCpuLoad();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Average time spent in CG since the last update.")
-    public double getCurrentGcCpuLoad();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("The initial size of memory in bytes; -1 if undefined.")
-    public long getHeapMemoryInitialized();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Current heap size that is used for object allocation.")
-    public long getHeapMemoryUsed();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("The amount of committed memory in bytes.")
-    public long getHeapMemoryCommitted();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("The maximum amount of memory in bytes; -1 if undefined.")
-    public long getHeapMemoryMaximum();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("The total amount of memory in bytes; -1 if undefined.")
-    public long getHeapMemoryTotal();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("The initial size of memory in bytes; -1 if undefined.")
-    public long getNonHeapMemoryInitialized();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Current non-heap memory size that is used by Java VM.")
-    public long getNonHeapMemoryUsed();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Amount of non-heap memory in bytes that is committed for the JVM to use.")
-    public long getNonHeapMemoryCommitted();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Maximum amount of non-heap memory in bytes that can " +
-        "be used for memory management. -1 if undefined.")
-    public long getNonHeapMemoryMaximum();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Total amount of non-heap memory in bytes that can " +
-        "be used for memory management. -1 if undefined.")
-    public long getNonHeapMemoryTotal();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Uptime of the JVM in milliseconds.")
-    public long getUpTime();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Start time of the JVM in milliseconds.")
-    public long getStartTime();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Current number of live threads.")
-    public int getCurrentThreadCount();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("The peak live thread count.")
-    public int getMaximumThreadCount();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("The total number of threads started.")
-    public long getTotalStartedThreadCount();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Current number of live daemon threads.")
-    public int getCurrentDaemonThreadCount();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Last data version.")
-    public long getLastDataVersion();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Sent messages count.")
-    public int getSentMessagesCount();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Sent bytes count.")
-    public long getSentBytesCount();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Received messages count.")
-    public int getReceivedMessagesCount();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Received bytes count.")
-    public long getReceivedBytesCount();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Outbound messages queue size.")
-    public int getOutboundMessagesQueueSize();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Start time of the grid node in milliseconds.")
-    public long getNodeStartTime();
-
-    /** {@inheritDoc} */
-    @MXBeanDescription("Total number of nodes.")
-    public int getTotalNodes();
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ignite/blob/0295518b/modules/core/src/main/java/org/apache/ignite/mxbean/ClusterMetricsMXBean.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/mxbean/ClusterMetricsMXBean.java b/modules/core/src/main/java/org/apache/ignite/mxbean/ClusterMetricsMXBean.java
new file mode 100644
index 0000000..21c05db
--- /dev/null
+++ b/modules/core/src/main/java/org/apache/ignite/mxbean/ClusterMetricsMXBean.java
@@ -0,0 +1,257 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.mxbean;
+
+import org.apache.ignite.cluster.ClusterMetrics;
+
+/**
+ * MBean for local node metrics.
+ */
+@MXBeanDescription("MBean that provides access to all local node metrics.")
+public interface ClusterMetricsMXBean extends ClusterMetrics {
+    /** {@inheritDoc} */
+    @MXBeanDescription("Last update time of this node metrics.")
+    public long getLastUpdateTime();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Maximum number of jobs that ever ran concurrently on this node.")
+    public int getMaximumActiveJobs();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Number of currently active jobs concurrently executing on the node.")
+    public int getCurrentActiveJobs();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Average number of active jobs concurrently executing on the node.")
+    public float getAverageActiveJobs();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Maximum number of waiting jobs this node had.")
+    public int getMaximumWaitingJobs();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Number of queued jobs currently waiting to be executed.")
+    public int getCurrentWaitingJobs();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Average number of waiting jobs this node had queued.")
+    public float getAverageWaitingJobs();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Maximum number of jobs rejected at once during a single collision resolution operation.")
+    public int getMaximumRejectedJobs();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Number of jobs rejected after more recent collision resolution operation.")
+    public int getCurrentRejectedJobs();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Average number of jobs this node rejects during collision resolution operations.")
+    public float getAverageRejectedJobs();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription(
+        "Total number of jobs this node rejects during collision resolution operations since node startup.")
+    public int getTotalRejectedJobs();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Maximum number of cancelled jobs this node ever had running concurrently.")
+    public int getMaximumCancelledJobs();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Number of cancelled jobs that are still running.")
+    public int getCurrentCancelledJobs();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Average number of cancelled jobs this node ever had running concurrently.")
+    public float getAverageCancelledJobs();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Total number of cancelled jobs since node startup.")
+    public int getTotalCancelledJobs();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Total number of jobs handled by the node.")
+    public int getTotalExecutedJobs();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Total time all finished jobs takes to execute on the node.")
+    public long getTotalJobsExecutionTime();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Maximum time a job ever spent waiting in a queue to be executed.")
+    public long getMaximumJobWaitTime();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Current wait time of oldest job.")
+    public long getCurrentJobWaitTime();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Average time jobs spend waiting in the queue to be executed.")
+    public double getAverageJobWaitTime();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Time it took to execute the longest job on the node.")
+    public long getMaximumJobExecuteTime();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Longest time a current job has been executing for.")
+    public long getCurrentJobExecuteTime();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Average time a job takes to execute on the node.")
+    public double getAverageJobExecuteTime();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Total number of tasks handled by the node.")
+    public int getTotalExecutedTasks();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Total time this node spent executing jobs.")
+    public long getTotalBusyTime();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Total time this node spent idling (not executing any jobs).")
+    public long getTotalIdleTime();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Time this node spend idling since executing last job.")
+    public long getCurrentIdleTime();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Percentage of time this node is busy executing jobs vs. idling.")
+    public float getBusyTimePercentage();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Percentage of time this node is idling vs. executing jobs.")
+    public float getIdleTimePercentage();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("The number of CPUs available to the Java Virtual Machine.")
+    public int getTotalCpus();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("The system load average; or a negative value if not available.")
+    public double getCurrentCpuLoad();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Average of CPU load values over all metrics kept in the history.")
+    public double getAverageCpuLoad();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Average time spent in CG since the last update.")
+    public double getCurrentGcCpuLoad();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("The initial size of memory in bytes; -1 if undefined.")
+    public long getHeapMemoryInitialized();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Current heap size that is used for object allocation.")
+    public long getHeapMemoryUsed();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("The amount of committed memory in bytes.")
+    public long getHeapMemoryCommitted();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("The maximum amount of memory in bytes; -1 if undefined.")
+    public long getHeapMemoryMaximum();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("The total amount of memory in bytes; -1 if undefined.")
+    public long getHeapMemoryTotal();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("The initial size of memory in bytes; -1 if undefined.")
+    public long getNonHeapMemoryInitialized();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Current non-heap memory size that is used by Java VM.")
+    public long getNonHeapMemoryUsed();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Amount of non-heap memory in bytes that is committed for the JVM to use.")
+    public long getNonHeapMemoryCommitted();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Maximum amount of non-heap memory in bytes that can " +
+        "be used for memory management. -1 if undefined.")
+    public long getNonHeapMemoryMaximum();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Total amount of non-heap memory in bytes that can " +
+        "be used for memory management. -1 if undefined.")
+    public long getNonHeapMemoryTotal();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Uptime of the JVM in milliseconds.")
+    public long getUpTime();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Start time of the JVM in milliseconds.")
+    public long getStartTime();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Current number of live threads.")
+    public int getCurrentThreadCount();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("The peak live thread count.")
+    public int getMaximumThreadCount();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("The total number of threads started.")
+    public long getTotalStartedThreadCount();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Current number of live daemon threads.")
+    public int getCurrentDaemonThreadCount();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Last data version.")
+    public long getLastDataVersion();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Sent messages count.")
+    public int getSentMessagesCount();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Sent bytes count.")
+    public long getSentBytesCount();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Received messages count.")
+    public int getReceivedMessagesCount();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Received bytes count.")
+    public long getReceivedBytesCount();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Outbound messages queue size.")
+    public int getOutboundMessagesQueueSize();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Start time of the grid node in milliseconds.")
+    public long getNodeStartTime();
+
+    /** {@inheritDoc} */
+    @MXBeanDescription("Total number of nodes.")
+    public int getTotalNodes();
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/0295518b/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java b/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java
index 1352c37..2e4f248 100644
--- a/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/internal/ClusterNodeMetricsSelfTest.java
@@ -218,6 +218,7 @@ public class ClusterNodeMetricsSelfTest extends GridCommonAbstractTest {
         assert metrics.getTotalExecutedJobs() == 1;
         assert metrics.getTotalRejectedJobs() == 0;
         assert metrics.getTotalExecutedTasks() == 1;
+        assert metrics.getTotalJobsExecutionTime() > 0;
 
         assertTrue("MaximumJobExecuteTime=" + metrics.getMaximumJobExecuteTime() +
             " is less than AverageJobExecuteTime=" + metrics.getAverageJobExecuteTime(),
@@ -274,6 +275,7 @@ public class ClusterNodeMetricsSelfTest extends GridCommonAbstractTest {
         assert metrics.getTotalExecutedJobs() == 0;
         assert metrics.getTotalRejectedJobs() == 0;
         assert metrics.getTotalExecutedTasks() == 0;
+        assert metrics.getTotalJobsExecutionTime() == 0;
 
         assertTrue("MaximumJobExecuteTime=" + metrics.getMaximumJobExecuteTime() +
             " is less than AverageJobExecuteTime=" + metrics.getAverageJobExecuteTime(),
@@ -375,4 +377,4 @@ public class ClusterNodeMetricsSelfTest extends GridCommonAbstractTest {
     private static class TestInternalTask extends GridTestTask {
         // No-op.
     }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/ignite/blob/0295518b/modules/core/src/test/java/org/apache/ignite/spi/discovery/ClusterMetricsSnapshotSerializeSelfTest.java
----------------------------------------------------------------------
diff --git a/modules/core/src/test/java/org/apache/ignite/spi/discovery/ClusterMetricsSnapshotSerializeSelfTest.java b/modules/core/src/test/java/org/apache/ignite/spi/discovery/ClusterMetricsSnapshotSerializeSelfTest.java
index a1e36a3..25de2c7 100644
--- a/modules/core/src/test/java/org/apache/ignite/spi/discovery/ClusterMetricsSnapshotSerializeSelfTest.java
+++ b/modules/core/src/test/java/org/apache/ignite/spi/discovery/ClusterMetricsSnapshotSerializeSelfTest.java
@@ -143,6 +143,8 @@ public class ClusterMetricsSnapshotSerializeSelfTest extends GridCommonAbstractT
         metrics.setOutboundMessagesQueueSize(46);
         metrics.setNonHeapMemoryTotal(47);
         metrics.setHeapMemoryTotal(48);
+        metrics.setTotalNodes(49);
+        metrics.setTotalJobsExecutionTime(50);
 
         return metrics;
     }
@@ -198,6 +200,8 @@ public class ClusterMetricsSnapshotSerializeSelfTest extends GridCommonAbstractT
             obj.getReceivedBytesCount() == obj1.getReceivedBytesCount() &&
             obj.getOutboundMessagesQueueSize() == obj1.getOutboundMessagesQueueSize() &&
             obj.getNonHeapMemoryTotal() == obj1.getNonHeapMemoryTotal() &&
-            obj.getHeapMemoryTotal() == obj1.getHeapMemoryTotal();
+            obj.getHeapMemoryTotal() == obj1.getHeapMemoryTotal() &&
+            obj.getTotalNodes() == obj1.getTotalNodes() &&
+            obj.getTotalJobsExecutionTime() == obj1.getTotalJobsExecutionTime();
     }
-}
\ No newline at end of file
+}


Mime
View raw message