diff --git a/apps/cpman/app/pom.xml b/apps/cpman/app/pom.xml
index 8a3bc9a..b495b09 100644
--- a/apps/cpman/app/pom.xml
+++ b/apps/cpman/app/pom.xml
@@ -58,13 +58,14 @@
             <artifactId>onos-cli</artifactId>
             <version>${project.version}</version>
         </dependency>
-
         <dependency>
             <groupId>org.apache.karaf.shell</groupId>
             <artifactId>org.apache.karaf.shell.console</artifactId>
-            <scope>compile</scope>
         </dependency>
-
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.scr.annotations</artifactId>
+        </dependency>
         <dependency>
             <groupId>org.onosproject</groupId>
             <artifactId>onlab-junit</artifactId>
@@ -180,6 +181,7 @@
                             com.fasterxml.jackson.core,
                             org.apache.karaf.shell.commands,
                             org.apache.karaf.shell.console,
+                            org.apache.karaf.shell.console.completer,
                             com.google.common.*,
                             org.onlab.packet.*,
                             org.onlab.rest.*,
diff --git a/apps/cpman/app/src/main/java/org/onosproject/cpman/cli/ControlMessageDeviceIdCompleter.java b/apps/cpman/app/src/main/java/org/onosproject/cpman/cli/ControlMessageDeviceIdCompleter.java
new file mode 100644
index 0000000..ab063a0
--- /dev/null
+++ b/apps/cpman/app/src/main/java/org/onosproject/cpman/cli/ControlMessageDeviceIdCompleter.java
@@ -0,0 +1,56 @@
+/*
+ * Copyright 2016 Open Networking Laboratory
+ *
+ * Licensed 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.onosproject.cpman.cli;
+
+import org.apache.karaf.shell.console.completer.ArgumentCompleter;
+import org.apache.karaf.shell.console.completer.StringsCompleter;
+import org.onosproject.cli.AbstractCompleter;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.cpman.ControlPlaneMonitorService;
+
+import java.util.List;
+import java.util.Set;
+import java.util.SortedSet;
+
+import static org.onosproject.cpman.ControlResource.Type;
+
+/**
+ * Device identification completer for control plane manager.
+ */
+public class ControlMessageDeviceIdCompleter extends AbstractCompleter {
+    @Override
+    public int complete(String buffer, int cursor, List<String> candidates) {
+        // delegate string completer
+        StringsCompleter delegate = new StringsCompleter();
+
+        // Resource type is the second argument.
+        ArgumentCompleter.ArgumentList list = getArgumentList();
+        String type = list.getArguments()[1];
+
+        if (Type.CONTROL_MESSAGE.toString().toLowerCase().equals(type)) {
+            ControlPlaneMonitorService monitorService =
+                    AbstractShellCommand.get(ControlPlaneMonitorService.class);
+
+            Set<String> set = monitorService.availableResources(Type.CONTROL_MESSAGE);
+
+            SortedSet<String> strings = delegate.getStrings();
+            if (set != null) {
+                set.forEach(s -> strings.add(s));
+            }
+        }
+        return delegate.complete(buffer, cursor, candidates);
+    }
+}
diff --git a/apps/cpman/app/src/main/java/org/onosproject/cpman/cli/ControlMetricsStatsListCommand.java b/apps/cpman/app/src/main/java/org/onosproject/cpman/cli/ControlMetricsStatsListCommand.java
new file mode 100644
index 0000000..2b061d2
--- /dev/null
+++ b/apps/cpman/app/src/main/java/org/onosproject/cpman/cli/ControlMetricsStatsListCommand.java
@@ -0,0 +1,117 @@
+/*
+ * Copyright 2016 Open Networking Laboratory
+ *
+ * Licensed 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.onosproject.cpman.cli;
+
+import org.apache.karaf.shell.commands.Argument;
+import org.apache.karaf.shell.commands.Command;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.cluster.ClusterService;
+import org.onosproject.cluster.NodeId;
+import org.onosproject.cpman.ControlLoad;
+import org.onosproject.cpman.ControlMetricType;
+import org.onosproject.cpman.ControlPlaneMonitorService;
+import org.onosproject.net.DeviceId;
+
+import java.util.Optional;
+import java.util.Set;
+
+import static org.onosproject.cpman.ControlResource.CONTROL_MESSAGE_METRICS;
+import static org.onosproject.cpman.ControlResource.CPU_METRICS;
+import static org.onosproject.cpman.ControlResource.DISK_METRICS;
+import static org.onosproject.cpman.ControlResource.MEMORY_METRICS;
+import static org.onosproject.cpman.ControlResource.NETWORK_METRICS;
+
+/**
+ * Lists all stats information of control plane metrics.
+ */
+@Command(scope = "onos", name = "cpman-stats-list",
+        description = "Lists control metrics statistics")
+public class ControlMetricsStatsListCommand extends AbstractShellCommand {
+
+    private static final String FMT = "metricType=%s, latestValue=%d, " +
+            "averageValue=%d, latestTime=%s";
+    private static final String INVALID_TYPE = "Invalid control resource type.";
+
+    @Argument(index = 0, name = "type",
+            description = "Resource type (cpu|memory|disk|network|control_message)",
+            required = true, multiValued = false)
+    String type = null;
+
+    @Argument(index = 1, name = "name", description = "Resource name (or Device Id)",
+            required = false, multiValued = false)
+    String name = null;
+
+    @Override
+    protected void execute() {
+        ControlPlaneMonitorService service = get(ControlPlaneMonitorService.class);
+        ClusterService clusterService = get(ClusterService.class);
+        NodeId nodeId = clusterService.getLocalNode().id();
+        switch (type) {
+            case "cpu":
+                printMetricsStats(service, nodeId, CPU_METRICS);
+                break;
+            case "memory":
+                printMetricsStats(service, nodeId, MEMORY_METRICS);
+                break;
+            case "disk":
+                printMetricsStats(service, nodeId, DISK_METRICS, name);
+                break;
+            case "network":
+                printMetricsStats(service, nodeId, NETWORK_METRICS, name);
+                break;
+            case "control_message":
+                if (name != null) {
+                    printMetricsStats(service, nodeId, CONTROL_MESSAGE_METRICS, DeviceId.deviceId(name));
+                }
+                break;
+            default:
+                print(INVALID_TYPE);
+                break;
+        }
+    }
+
+    private void printMetricsStats(ControlPlaneMonitorService service, NodeId nodeId,
+                                   Set<ControlMetricType> typeSet) {
+        printMetricsStats(service, nodeId, typeSet, null, null);
+    }
+
+    private void printMetricsStats(ControlPlaneMonitorService service, NodeId nodeId,
+                                   Set<ControlMetricType> typeSet, String name) {
+        printMetricsStats(service, nodeId, typeSet, name, null);
+    }
+
+    private void printMetricsStats(ControlPlaneMonitorService service, NodeId nodeId,
+                                   Set<ControlMetricType> typeSet, DeviceId did) {
+        printMetricsStats(service, nodeId, typeSet, null, did);
+    }
+
+    private void printMetricsStats(ControlPlaneMonitorService service, NodeId nodeId,
+                                   Set<ControlMetricType> typeSet, String name, DeviceId did) {
+        if (name == null && did == null) {
+            typeSet.forEach(s -> print(s, service.getLoad(nodeId, s, Optional.ofNullable(null))));
+        } else if (name == null && did != null) {
+            typeSet.forEach(s -> print(s, service.getLoad(nodeId, s, Optional.of(did))));
+        } else if (name != null && did == null) {
+            typeSet.forEach(s -> print(s, service.getLoad(nodeId, s, name)));
+        }
+    }
+
+    private void print(ControlMetricType type, ControlLoad cl) {
+        if (cl != null) {
+            print(FMT, type.toString(), cl.latest(), cl.average(), cl.time());
+        }
+    }
+}
diff --git a/apps/cpman/app/src/main/java/org/onosproject/cpman/cli/ControlResourceTypeCompleter.java b/apps/cpman/app/src/main/java/org/onosproject/cpman/cli/ControlResourceTypeCompleter.java
new file mode 100644
index 0000000..cc3b225
--- /dev/null
+++ b/apps/cpman/app/src/main/java/org/onosproject/cpman/cli/ControlResourceTypeCompleter.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2016 Open Networking Laboratory
+ *
+ * Licensed 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.onosproject.cpman.cli;
+
+import com.google.common.collect.ImmutableList;
+import org.onosproject.cli.AbstractChoicesCompleter;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import static org.onosproject.cpman.ControlResource.Type;
+
+/**
+ * Control resource type completer.
+ */
+public class ControlResourceTypeCompleter extends AbstractChoicesCompleter {
+
+    private static final List<Type> RESOURCE_TYPES =
+            ImmutableList.of(Type.CPU, Type.MEMORY, Type.DISK, Type.NETWORK,
+                    Type.CONTROL_MESSAGE);
+
+    @Override
+    protected List<String> choices() {
+        return RESOURCE_TYPES.stream().map(type ->
+                type.toString().toLowerCase()).collect(Collectors.toList());
+    }
+}
diff --git a/apps/cpman/app/src/main/java/org/onosproject/cpman/cli/DiskResourceNameCompleter.java b/apps/cpman/app/src/main/java/org/onosproject/cpman/cli/DiskResourceNameCompleter.java
new file mode 100644
index 0000000..f67d629
--- /dev/null
+++ b/apps/cpman/app/src/main/java/org/onosproject/cpman/cli/DiskResourceNameCompleter.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright 2016 Open Networking Laboratory
+ *
+ * Licensed 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.onosproject.cpman.cli;
+
+import org.apache.karaf.shell.console.completer.ArgumentCompleter;
+import org.apache.karaf.shell.console.completer.StringsCompleter;
+import org.onosproject.cli.AbstractCompleter;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.cpman.ControlPlaneMonitorService;
+
+import java.util.List;
+import java.util.Set;
+import java.util.SortedSet;
+
+import static org.onosproject.cpman.ControlResource.Type;
+/**
+ * Disk resource name completer.
+ */
+public class DiskResourceNameCompleter extends AbstractCompleter {
+    @Override
+    public int complete(String buffer, int cursor, List<String> candidates) {
+        // delegate string completer
+        StringsCompleter delegate = new StringsCompleter();
+
+        // Resource type is the second argument.
+        ArgumentCompleter.ArgumentList list = getArgumentList();
+        String type = list.getArguments()[1];
+
+        if (Type.DISK.toString().toLowerCase().equals(type)) {
+            ControlPlaneMonitorService monitorService =
+                    AbstractShellCommand.get(ControlPlaneMonitorService.class);
+
+            Set<String> set = monitorService.availableResources(Type.DISK);
+            SortedSet<String> strings = delegate.getStrings();
+
+            if (set != null) {
+                set.forEach(s -> strings.add(s));
+            }
+        }
+        return delegate.complete(buffer, cursor, candidates);
+    }
+}
diff --git a/apps/cpman/app/src/main/java/org/onosproject/cpman/cli/NetworkResourceNameCompleter.java b/apps/cpman/app/src/main/java/org/onosproject/cpman/cli/NetworkResourceNameCompleter.java
new file mode 100644
index 0000000..576d8ee
--- /dev/null
+++ b/apps/cpman/app/src/main/java/org/onosproject/cpman/cli/NetworkResourceNameCompleter.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2016 Open Networking Laboratory
+ *
+ * Licensed 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.onosproject.cpman.cli;
+
+import org.apache.karaf.shell.console.completer.ArgumentCompleter;
+import org.apache.karaf.shell.console.completer.StringsCompleter;
+import org.onosproject.cli.AbstractCompleter;
+import org.onosproject.cli.AbstractShellCommand;
+import org.onosproject.cpman.ControlPlaneMonitorService;
+
+import java.util.List;
+import java.util.Set;
+import java.util.SortedSet;
+
+import static org.onosproject.cpman.ControlResource.Type;
+
+/**
+ * Network resource name completer.
+ */
+public class NetworkResourceNameCompleter extends AbstractCompleter {
+    @Override
+    public int complete(String buffer, int cursor, List<String> candidates) {
+        // delegate string completer
+        StringsCompleter delegate = new StringsCompleter();
+
+        // Resource type is the second argument.
+        ArgumentCompleter.ArgumentList list = getArgumentList();
+        String type = list.getArguments()[1];
+
+        if (Type.NETWORK.toString().toLowerCase().equals(type)) {
+            ControlPlaneMonitorService monitorService =
+                    AbstractShellCommand.get(ControlPlaneMonitorService.class);
+
+            Set<String> set = monitorService.availableResources(Type.NETWORK);
+            SortedSet<String> strings = delegate.getStrings();
+
+            if (set != null) {
+                set.forEach(s -> strings.add(s));
+            }
+        }
+
+        return delegate.complete(buffer, cursor, candidates);
+    }
+}
diff --git a/apps/cpman/app/src/main/java/org/onosproject/cpman/cli/package-info.java b/apps/cpman/app/src/main/java/org/onosproject/cpman/cli/package-info.java
new file mode 100644
index 0000000..adcb6cf
--- /dev/null
+++ b/apps/cpman/app/src/main/java/org/onosproject/cpman/cli/package-info.java
@@ -0,0 +1,19 @@
+/*
+ * Copyright 2016 Open Networking Laboratory
+ *
+ * Licensed 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.
+ */
+/**
+ * CLI implementation for control plane manager.
+ */
+package org.onosproject.cpman.cli;
\ No newline at end of file
diff --git a/apps/cpman/app/src/main/java/org/onosproject/cpman/impl/ControlPlaneMonitor.java b/apps/cpman/app/src/main/java/org/onosproject/cpman/impl/ControlPlaneMonitor.java
index 66b4a57..77e8e89 100644
--- a/apps/cpman/app/src/main/java/org/onosproject/cpman/impl/ControlPlaneMonitor.java
+++ b/apps/cpman/app/src/main/java/org/onosproject/cpman/impl/ControlPlaneMonitor.java
@@ -16,6 +16,8 @@
 package org.onosproject.cpman.impl;
 
 import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
 import org.apache.felix.scr.annotations.Activate;
 import org.apache.felix.scr.annotations.Component;
 import org.apache.felix.scr.annotations.Deactivate;
@@ -37,29 +39,9 @@
 import java.util.Map;
 import java.util.Optional;
 import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
+import java.util.stream.Collectors;
 
-import static org.onosproject.cpman.ControlMetricType.CPU_IDLE_TIME;
-import static org.onosproject.cpman.ControlMetricType.CPU_LOAD;
-import static org.onosproject.cpman.ControlMetricType.DISK_READ_BYTES;
-import static org.onosproject.cpman.ControlMetricType.DISK_WRITE_BYTES;
-import static org.onosproject.cpman.ControlMetricType.FLOW_MOD_PACKET;
-import static org.onosproject.cpman.ControlMetricType.FLOW_REMOVED_PACKET;
-import static org.onosproject.cpman.ControlMetricType.INBOUND_PACKET;
-import static org.onosproject.cpman.ControlMetricType.MEMORY_FREE;
-import static org.onosproject.cpman.ControlMetricType.MEMORY_FREE_RATIO;
-import static org.onosproject.cpman.ControlMetricType.MEMORY_USED;
-import static org.onosproject.cpman.ControlMetricType.MEMORY_USED_RATIO;
-import static org.onosproject.cpman.ControlMetricType.NW_INCOMING_BYTES;
-import static org.onosproject.cpman.ControlMetricType.NW_INCOMING_PACKETS;
-import static org.onosproject.cpman.ControlMetricType.NW_OUTGOING_BYTES;
-import static org.onosproject.cpman.ControlMetricType.NW_OUTGOING_PACKETS;
-import static org.onosproject.cpman.ControlMetricType.OUTBOUND_PACKET;
-import static org.onosproject.cpman.ControlMetricType.REPLY_PACKET;
-import static org.onosproject.cpman.ControlMetricType.REQUEST_PACKET;
-import static org.onosproject.cpman.ControlMetricType.SYS_CPU_TIME;
-import static org.onosproject.cpman.ControlMetricType.TOTAL_CPU_TIME;
-import static org.onosproject.cpman.ControlMetricType.USER_CPU_TIME;
+import static org.onosproject.cpman.ControlResource.*;
 
 /**
  * Control plane monitoring service class.
@@ -78,45 +60,34 @@
     @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
     protected ClusterService clusterService;
 
-    private static final String CPU = "Cpu";
-    private static final String MEMORY = "Memory";
-    private static final String CTRL_MSG = "ControlMessage";
-    private static final String DISK = "Disk";
-    private static final String NETWORK = "Network";
+    private static final Set RESOURCE_TYPE_SET =
+            ImmutableSet.of(Type.CONTROL_MESSAGE, Type.DISK, Type.NETWORK);
 
-    private static final Set<ControlMetricType> CPU_METRICS =
-            ImmutableSet.of(CPU_IDLE_TIME, CPU_LOAD, SYS_CPU_TIME,
-                    USER_CPU_TIME, TOTAL_CPU_TIME);
-    private static final Set<ControlMetricType> MEMORY_METRICS =
-            ImmutableSet.of(MEMORY_FREE, MEMORY_FREE_RATIO, MEMORY_USED,
-                    MEMORY_USED_RATIO);
-    private static final Set<ControlMetricType> DISK_METRICS =
-            ImmutableSet.of(DISK_READ_BYTES, DISK_WRITE_BYTES);
-    private static final Set<ControlMetricType> NETWORK_METRICS =
-            ImmutableSet.of(NW_INCOMING_BYTES, NW_OUTGOING_BYTES,
-                    NW_INCOMING_PACKETS, NW_OUTGOING_PACKETS);
-    private static final Set<ControlMetricType> CTRL_MSGS =
-            ImmutableSet.of(INBOUND_PACKET, OUTBOUND_PACKET, FLOW_MOD_PACKET,
-                    FLOW_REMOVED_PACKET, REQUEST_PACKET, REPLY_PACKET);
     private Map<ControlMetricType, Double> cpuBuf;
     private Map<ControlMetricType, Double> memoryBuf;
     private Map<String, Map<ControlMetricType, Double>> diskBuf;
     private Map<String, Map<ControlMetricType, Double>> networkBuf;
     private Map<DeviceId, Map<ControlMetricType, Double>> ctrlMsgBuf;
 
+    private Map<Type, Set<String>> availableResourceMap;
+    private Set<DeviceId> availableDeviceIdSet;
+
     @Activate
     public void activate() {
-        cpuMetrics = genMDbBuilder(CPU, CPU_METRICS);
-        memoryMetrics = genMDbBuilder(MEMORY, MEMORY_METRICS);
-        controlMessageMap = new ConcurrentHashMap<>();
-        diskMetricsMap = new ConcurrentHashMap<>();
-        networkMetricsMap = new ConcurrentHashMap<>();
+        cpuMetrics = genMDbBuilder(Type.CPU, CPU_METRICS);
+        memoryMetrics = genMDbBuilder(Type.MEMORY, MEMORY_METRICS);
+        controlMessageMap = Maps.newConcurrentMap();
+        diskMetricsMap = Maps.newConcurrentMap();
+        networkMetricsMap = Maps.newConcurrentMap();
 
-        cpuBuf = new ConcurrentHashMap<>();
-        memoryBuf = new ConcurrentHashMap<>();
-        diskBuf = new ConcurrentHashMap<>();
-        networkBuf = new ConcurrentHashMap<>();
-        ctrlMsgBuf = new ConcurrentHashMap<>();
+        cpuBuf = Maps.newConcurrentMap();
+        memoryBuf = Maps.newConcurrentMap();
+        diskBuf = Maps.newConcurrentMap();
+        networkBuf = Maps.newConcurrentMap();
+        ctrlMsgBuf = Maps.newConcurrentMap();
+
+        availableResourceMap = Maps.newConcurrentMap();
+        availableDeviceIdSet = Sets.newConcurrentHashSet();
 
         log.info("Started");
     }
@@ -140,10 +111,14 @@
         if (deviceId.isPresent()) {
 
             // insert a new device entry if we cannot find any
-            ctrlMsgBuf.putIfAbsent(deviceId.get(), new ConcurrentHashMap<>());
+            ctrlMsgBuf.putIfAbsent(deviceId.get(), Maps.newConcurrentMap());
 
             // update control message metrics
-            if (CTRL_MSGS.contains(cm.metricType())) {
+            if (CONTROL_MESSAGE_METRICS.contains(cm.metricType())) {
+
+                if (!availableDeviceIdSet.contains(deviceId.get())) {
+                    availableDeviceIdSet.add(deviceId.get());
+                }
 
                 // we will accumulate the metric value into buffer first
                 ctrlMsgBuf.get(deviceId.get()).putIfAbsent(cm.metricType(),
@@ -151,7 +126,8 @@
 
                 // if buffer contains all control message metrics,
                 // we simply set and update the values into MetricsDatabase.
-                if (ctrlMsgBuf.get(deviceId.get()).keySet().containsAll(CTRL_MSGS)) {
+                if (ctrlMsgBuf.get(deviceId.get()).keySet()
+                        .containsAll(CONTROL_MESSAGE_METRICS)) {
                     updateControlMessages(ctrlMsgBuf.get(deviceId.get()), deviceId.get());
                     ctrlMsgBuf.get(deviceId.get()).clear();
                 }
@@ -185,7 +161,14 @@
                              String resourceName) {
         // update disk metrics
         if (DISK_METRICS.contains(cm.metricType())) {
-            diskBuf.putIfAbsent(resourceName, new ConcurrentHashMap<>());
+            diskBuf.putIfAbsent(resourceName, Maps.newConcurrentMap());
+
+            availableResourceMap.putIfAbsent(Type.DISK, Sets.newHashSet());
+            availableResourceMap.computeIfPresent(Type.DISK, (k, v) -> {
+                v.add(resourceName);
+                return v;
+            });
+
             diskBuf.get(resourceName).putIfAbsent(cm.metricType(),
                     (double) cm.metricValue().getLoad());
             if (diskBuf.get(resourceName).keySet().containsAll(DISK_METRICS)) {
@@ -196,7 +179,14 @@
 
         // update network metrics
         if (NETWORK_METRICS.contains(cm.metricType())) {
-            networkBuf.putIfAbsent(resourceName, new ConcurrentHashMap<>());
+            networkBuf.putIfAbsent(resourceName, Maps.newConcurrentMap());
+
+            availableResourceMap.putIfAbsent(Type.NETWORK, Sets.newHashSet());
+            availableResourceMap.computeIfPresent(Type.NETWORK, (k, v) -> {
+                v.add(resourceName);
+                return v;
+            });
+
             networkBuf.get(resourceName).putIfAbsent(cm.metricType(),
                     (double) cm.metricValue().getLoad());
             if (networkBuf.get(resourceName).keySet().containsAll(NETWORK_METRICS)) {
@@ -213,7 +203,8 @@
         if (clusterService.getLocalNode().equals(node)) {
 
             if (deviceId.isPresent()) {
-                if (CTRL_MSGS.contains(type)) {
+                if (CONTROL_MESSAGE_METRICS.contains(type) &&
+                        availableDeviceIdSet.contains(deviceId.get())) {
                     return new DefaultControlLoad(controlMessageMap.get(deviceId.get()), type);
                 }
             } else {
@@ -238,11 +229,13 @@
     public ControlLoad getLoad(NodeId nodeId, ControlMetricType type,
                                String resourceName) {
         if (clusterService.getLocalNode().id().equals(nodeId)) {
-            if (DISK_METRICS.contains(type)) {
+            if (DISK_METRICS.contains(type) &&
+                    availableResources(Type.DISK).contains(resourceName)) {
                 return new DefaultControlLoad(diskMetricsMap.get(resourceName), type);
             }
 
-            if (NETWORK_METRICS.contains(type)) {
+            if (NETWORK_METRICS.contains(type) &&
+                    availableResources(Type.NETWORK).contains(resourceName)) {
                 return new DefaultControlLoad(networkMetricsMap.get(resourceName), type);
             }
         } else {
@@ -252,34 +245,49 @@
         return null;
     }
 
-    private MetricsDatabase genMDbBuilder(String metricName,
+    @Override
+    public Set<String> availableResources(Type resourceType) {
+        if (RESOURCE_TYPE_SET.contains(resourceType)) {
+            if (Type.CONTROL_MESSAGE.equals(resourceType)) {
+                return availableDeviceIdSet.stream().map(id ->
+                        id.toString()).collect(Collectors.toSet());
+            } else {
+                return availableResourceMap.get(resourceType);
+            }
+        }
+        return null;
+    }
+
+    private MetricsDatabase genMDbBuilder(Type resourceType,
                                           Set<ControlMetricType> metricTypes) {
         MetricsDatabase.Builder builder = new DefaultMetricsDatabase.Builder();
-        builder.withMetricName(metricName);
+        builder.withMetricName(resourceType.toString());
         metricTypes.forEach(type -> builder.addMetricType(type.toString()));
         return builder.build();
     }
 
     private void updateNetworkMetrics(Map<ControlMetricType, Double> metricMap,
                                       String resName) {
-        networkMetricsMap.putIfAbsent(resName, genMDbBuilder(NETWORK, NETWORK_METRICS));
+        networkMetricsMap.putIfAbsent(resName,
+                genMDbBuilder(Type.NETWORK, NETWORK_METRICS));
         networkMetricsMap.get(resName).updateMetrics(convertMap(metricMap));
     }
 
     private void updateDiskMetrics(Map<ControlMetricType, Double> metricMap,
                                    String resName) {
-        diskMetricsMap.putIfAbsent(resName, genMDbBuilder(DISK, DISK_METRICS));
+        diskMetricsMap.putIfAbsent(resName, genMDbBuilder(Type.DISK, DISK_METRICS));
         diskMetricsMap.get(resName).updateMetrics(convertMap(metricMap));
     }
 
     private void updateControlMessages(Map<ControlMetricType, Double> metricMap,
                                        DeviceId devId) {
-        controlMessageMap.putIfAbsent(devId, genMDbBuilder(CTRL_MSG, CTRL_MSGS));
+        controlMessageMap.putIfAbsent(devId,
+                genMDbBuilder(Type.CONTROL_MESSAGE, CONTROL_MESSAGE_METRICS));
         controlMessageMap.get(devId).updateMetrics(convertMap(metricMap));
     }
 
     private Map convertMap(Map<ControlMetricType, Double> map) {
-        Map newMap = new ConcurrentHashMap<>();
+        Map newMap = Maps.newConcurrentMap();
         map.forEach((k, v) -> newMap.putIfAbsent(k.toString(), v));
         return newMap;
     }
diff --git a/apps/cpman/app/src/main/java/org/onosproject/cpman/impl/DefaultMetricsDatabase.java b/apps/cpman/app/src/main/java/org/onosproject/cpman/impl/DefaultMetricsDatabase.java
index db8be14..31a19da 100644
--- a/apps/cpman/app/src/main/java/org/onosproject/cpman/impl/DefaultMetricsDatabase.java
+++ b/apps/cpman/app/src/main/java/org/onosproject/cpman/impl/DefaultMetricsDatabase.java
@@ -231,7 +231,7 @@
     }
 
     public static final class Builder implements MetricsDatabase.Builder {
-        private static final int RESOLUTION = 60; // seconds
+        private static final int RESOLUTION_IN_SECOND = 60;
         private static final String STORING_METHOD = "MEMORY";
         private static final DsType SOURCE_TYPE = DsType.GAUGE;
         private static final String DB_PATH = "CPMAN";
@@ -259,7 +259,7 @@
             this.metricName = metricName;
 
             // define the resolution of monitored metrics
-            rrdDef = new RrdDef(DB_PATH + "_" + metricName, RESOLUTION);
+            rrdDef = new RrdDef(DB_PATH + "_" + metricName, RESOLUTION_IN_SECOND);
             return this;
         }
 
@@ -279,7 +279,7 @@
                 IntStream.range(0, dsDefs.size()).forEach(i -> dsDefArray[i] = dsDefs.get(i));
 
                 rrdDef.addDatasource(dsDefArray);
-                rrdDef.setStep(RESOLUTION);
+                rrdDef.setStep(RESOLUTION_IN_SECOND);
 
                 // raw archive, no aggregation is required
                 ArcDef rawArchive = new ArcDef(CONSOL_FUNCTION, XFF_VALUE,
@@ -296,7 +296,7 @@
         }
 
         private DsDef defineSchema(String metricType) {
-            return new DsDef(metricType, SOURCE_TYPE, RESOLUTION,
+            return new DsDef(metricType, SOURCE_TYPE, RESOLUTION_IN_SECOND,
                     MIN_VALUE, MAX_VALUE);
         }
     }
diff --git a/apps/cpman/app/src/main/resources/OSGI-INF/blueprint/shell-config.xml b/apps/cpman/app/src/main/resources/OSGI-INF/blueprint/shell-config.xml
new file mode 100644
index 0000000..095211f
--- /dev/null
+++ b/apps/cpman/app/src/main/resources/OSGI-INF/blueprint/shell-config.xml
@@ -0,0 +1,34 @@
+<!--
+  ~ Copyright 2016 Open Networking Laboratory
+  ~
+  ~ Licensed 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.
+  -->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+
+    <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+        <command>
+            <action class="org.onosproject.cpman.cli.ControlMetricsStatsListCommand"/>
+            <completers>
+                <ref component-id="controlResourceTypeCompleter"/>
+                <ref component-id="networkResourceNameCompleter"/>
+                <ref component-id="diskResourceNameCompleter"/>
+                <ref component-id="controlMessageDeviceIdCompleter"/>
+            </completers>
+        </command>
+    </command-bundle>
+
+    <bean id="controlResourceTypeCompleter" class="org.onosproject.cpman.cli.ControlResourceTypeCompleter"/>
+    <bean id="networkResourceNameCompleter" class="org.onosproject.cpman.cli.NetworkResourceNameCompleter"/>
+    <bean id="diskResourceNameCompleter" class="org.onosproject.cpman.cli.DiskResourceNameCompleter"/>
+    <bean id="controlMessageDeviceIdCompleter" class="org.onosproject.cpman.cli.ControlMessageDeviceIdCompleter"/>
+</blueprint>
\ No newline at end of file
diff --git a/apps/cpman/app/src/test/java/org/onosproject/cpman/impl/ControlPlaneMonitorTest.java b/apps/cpman/app/src/test/java/org/onosproject/cpman/impl/ControlPlaneMonitorTest.java
index 7c1afef..1ec963d 100644
--- a/apps/cpman/app/src/test/java/org/onosproject/cpman/impl/ControlPlaneMonitorTest.java
+++ b/apps/cpman/app/src/test/java/org/onosproject/cpman/impl/ControlPlaneMonitorTest.java
@@ -28,6 +28,7 @@
 import org.onosproject.net.DeviceId;
 
 import java.util.Optional;
+import java.util.Set;
 
 import static org.easymock.EasyMock.anyObject;
 import static org.easymock.EasyMock.createMock;
@@ -35,27 +36,8 @@
 import static org.easymock.EasyMock.replay;
 import static org.hamcrest.Matchers.is;
 import static org.junit.Assert.assertThat;
-import static org.onosproject.cpman.ControlMetricType.CPU_IDLE_TIME;
-import static org.onosproject.cpman.ControlMetricType.CPU_LOAD;
-import static org.onosproject.cpman.ControlMetricType.DISK_READ_BYTES;
-import static org.onosproject.cpman.ControlMetricType.DISK_WRITE_BYTES;
-import static org.onosproject.cpman.ControlMetricType.FLOW_MOD_PACKET;
-import static org.onosproject.cpman.ControlMetricType.FLOW_REMOVED_PACKET;
-import static org.onosproject.cpman.ControlMetricType.INBOUND_PACKET;
-import static org.onosproject.cpman.ControlMetricType.MEMORY_FREE;
-import static org.onosproject.cpman.ControlMetricType.MEMORY_FREE_RATIO;
-import static org.onosproject.cpman.ControlMetricType.MEMORY_USED;
-import static org.onosproject.cpman.ControlMetricType.MEMORY_USED_RATIO;
-import static org.onosproject.cpman.ControlMetricType.NW_INCOMING_BYTES;
-import static org.onosproject.cpman.ControlMetricType.NW_INCOMING_PACKETS;
-import static org.onosproject.cpman.ControlMetricType.NW_OUTGOING_BYTES;
-import static org.onosproject.cpman.ControlMetricType.NW_OUTGOING_PACKETS;
-import static org.onosproject.cpman.ControlMetricType.OUTBOUND_PACKET;
-import static org.onosproject.cpman.ControlMetricType.REPLY_PACKET;
-import static org.onosproject.cpman.ControlMetricType.REQUEST_PACKET;
-import static org.onosproject.cpman.ControlMetricType.SYS_CPU_TIME;
-import static org.onosproject.cpman.ControlMetricType.TOTAL_CPU_TIME;
-import static org.onosproject.cpman.ControlMetricType.USER_CPU_TIME;
+
+import static org.onosproject.cpman.ControlResource.*;
 
 /**
  * Unit test of control plane monitoring service.
@@ -67,23 +49,12 @@
     private ClusterService mockClusterService;
     private ControllerNode mockControllerNode;
     private NodeId nodeId;
-    private static final ImmutableSet<ControlMetricType> CPU_METRICS =
-            ImmutableSet.of(CPU_IDLE_TIME, CPU_LOAD, SYS_CPU_TIME,
-                    USER_CPU_TIME, TOTAL_CPU_TIME);
-    private static final ImmutableSet<ControlMetricType> MEMORY_METRICS =
-            ImmutableSet.of(MEMORY_FREE, MEMORY_FREE_RATIO, MEMORY_USED,
-                    MEMORY_USED_RATIO);
-    private static final ImmutableSet<ControlMetricType> DISK_METRICS =
-            ImmutableSet.of(DISK_READ_BYTES, DISK_WRITE_BYTES);
-    private static final ImmutableSet<ControlMetricType> NETWORK_METRICS =
-            ImmutableSet.of(NW_INCOMING_BYTES, NW_OUTGOING_BYTES,
-                    NW_INCOMING_PACKETS, NW_OUTGOING_PACKETS);
-    private static final ImmutableSet<ControlMetricType> CTRL_MSGS =
-            ImmutableSet.of(INBOUND_PACKET, OUTBOUND_PACKET, FLOW_MOD_PACKET,
-                    FLOW_REMOVED_PACKET, REQUEST_PACKET, REPLY_PACKET);
 
+    /**
+     * Sets up the services required by control plane monitor.
+     */
     @Before
-    public void setup() throws Exception {
+    public void setup() {
         monitor = new ControlPlaneMonitor();
         monitor.activate();
 
@@ -134,13 +105,13 @@
         assertThat(monitor.getLoad(nodeId, cmt, Optional.ofNullable(null)).latest(), is(mv.getLoad()));
     }
 
-    private void testUpdateMetricWithResource(ControlMetricType cmt, MetricValue mv, String resoureName) {
+    private void testUpdateMetricWithResource(ControlMetricType cmt, MetricValue mv, String resourceName) {
         ControlMetric cm = new ControlMetric(cmt, mv);
-        monitor.updateMetric(cm, UPDATE_INTERVAL, resoureName);
+        monitor.updateMetric(cm, UPDATE_INTERVAL, resourceName);
     }
 
-    private void testLoadMetricWithResource(ControlMetricType cmt, MetricValue mv, String resoureName) {
-        assertThat(monitor.getLoad(nodeId, cmt, resoureName).latest(), is(mv.getLoad()));
+    private void testLoadMetricWithResource(ControlMetricType cmt, MetricValue mv, String resourceName) {
+        assertThat(monitor.getLoad(nodeId, cmt, resourceName).latest(), is(mv.getLoad()));
     }
 
     private void testUpdateMetricWithId(ControlMetricType cmt, MetricValue mv, DeviceId did) {
@@ -152,6 +123,9 @@
         assertThat(monitor.getLoad(nodeId, cmt, Optional.of(did)).latest(), is(mv.getLoad()));
     }
 
+    /**
+     * Tests cpu metric update and load function.
+     */
     @Test
     public void testCpuMetric() {
         MetricValue mv = new MetricValue.Builder().load(30).add();
@@ -160,6 +134,9 @@
         CPU_METRICS.forEach(cmt -> testLoadMetricWithoutId(cmt, mv));
     }
 
+    /**
+     * Tests memory metric update and load function.
+     */
     @Test
     public void testMemoryMetric() {
         MetricValue mv = new MetricValue.Builder().load(40).add();
@@ -168,11 +145,14 @@
         MEMORY_METRICS.forEach(cmt -> testLoadMetricWithoutId(cmt, mv));
     }
 
+    /**
+     * Tests disk metric update and load function.
+     */
     @Test
     public void testDiskMetric() {
         MetricValue mv = new MetricValue.Builder().load(50).add();
 
-        ImmutableSet<String> set = ImmutableSet.of("disk1", "disk2");
+        Set<String> set = ImmutableSet.of("disk1", "disk2");
 
         set.forEach(disk -> DISK_METRICS.forEach(cmt ->
                 testUpdateMetricWithResource(cmt, mv, disk)));
@@ -181,11 +161,14 @@
                 testLoadMetricWithResource(cmt, mv, disk)));
     }
 
+    /**
+     * Tests network metric update and load function.
+     */
     @Test
     public void testNetworkMetric() {
         MetricValue mv = new MetricValue.Builder().load(10).add();
 
-        ImmutableSet<String> set = ImmutableSet.of("eth0", "eth1");
+        Set<String> set = ImmutableSet.of("eth0", "eth1");
 
         set.forEach(network -> NETWORK_METRICS.forEach(cmt ->
                 testUpdateMetricWithResource(cmt, mv, network)));
@@ -194,17 +177,40 @@
                 testLoadMetricWithResource(cmt, mv, network)));
     }
 
+    /**
+     * Tests control message update and load function.
+     */
     @Test
-    public void testUpdateControlMessage() {
+    public void testControlMessage() {
         MetricValue mv = new MetricValue.Builder().load(10).add();
+        Set<DeviceId> set = ImmutableSet.of(DeviceId.deviceId("of:0000000000000001"),
+                                            DeviceId.deviceId("of:0000000000000002"));
 
-        ImmutableSet<String> set = ImmutableSet.of("of:0000000000000001",
-                                                   "of:0000000000000002");
+        set.forEach(devId -> CONTROL_MESSAGE_METRICS.forEach(cmt ->
+                testUpdateMetricWithId(cmt, mv, devId)));
 
-        set.forEach(ctrlMsg -> CTRL_MSGS.forEach(cmt ->
-                testUpdateMetricWithId(cmt, mv, DeviceId.deviceId(ctrlMsg))));
+        set.forEach(devId -> CONTROL_MESSAGE_METRICS.forEach(cmt ->
+                testLoadMetricWithId(cmt, mv, devId)));
+    }
 
-        set.forEach(ctrlMsg -> CTRL_MSGS.forEach(cmt ->
-                testLoadMetricWithId(cmt, mv, DeviceId.deviceId(ctrlMsg))));
+    /**
+     * Tests available resource update and load function.
+     */
+    @Test
+    public void testAvailableResources() {
+        MetricValue mv = new MetricValue.Builder().load(50).add();
+
+        Set<String> diskSet = ImmutableSet.of("disk1", "disk2");
+
+        diskSet.forEach(disk -> DISK_METRICS.forEach(cmt ->
+                testUpdateMetricWithResource(cmt, mv, disk)));
+
+        Set<String> networkSet = ImmutableSet.of("eth0", "eth1");
+
+        networkSet.forEach(network -> NETWORK_METRICS.forEach(cmt ->
+                testUpdateMetricWithResource(cmt, mv, network)));
+
+        assertThat(monitor.availableResources(Type.DISK), is(diskSet));
+        assertThat(monitor.availableResources(Type.NETWORK), is(networkSet));
     }
 }
diff --git a/apps/cpman/app/src/test/java/org/onosproject/cpman/impl/MetricsDatabaseTest.java b/apps/cpman/app/src/test/java/org/onosproject/cpman/impl/MetricsDatabaseTest.java
index 6058227..713c7d8 100644
--- a/apps/cpman/app/src/test/java/org/onosproject/cpman/impl/MetricsDatabaseTest.java
+++ b/apps/cpman/app/src/test/java/org/onosproject/cpman/impl/MetricsDatabaseTest.java
@@ -39,7 +39,7 @@
     private static final String MEMORY_USED_PERC = "usedPerc";
 
     /**
-     * Initializes the MetricsDatabase instance.
+     * Initializes metrics database instance.
      */
     @Before
     public void setUp() {
