You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gm...@apache.org on 2018/03/21 21:30:21 UTC

qpid-dispatch git commit: DISPATCH-933 - Created new RouterStats entity. Moved some attributes from Router entity to RouterStats. Router entity is not handled by the Python management agent and the RouterStats entity is handled by the C management agent

Repository: qpid-dispatch
Updated Branches:
  refs/heads/master fff61db81 -> 6f85537c7


DISPATCH-933 - Created new RouterStats entity. Moved some attributes from Router entity to RouterStats. Router entity is not handled by the Python management agent and the RouterStats entity is handled by the C management agent


Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/6f85537c
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/6f85537c
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/6f85537c

Branch: refs/heads/master
Commit: 6f85537c77bdefa18d2401363aca683b7d24aea1
Parents: fff61db
Author: Ganesh Murthy <gm...@redhat.com>
Authored: Wed Feb 28 13:58:10 2018 -0500
Committer: Ganesh Murthy <gm...@redhat.com>
Committed: Wed Mar 21 17:30:02 2018 -0400

----------------------------------------------------------------------
 include/qpid/dispatch/router_core.h             |   2 +-
 python/qpid_dispatch/management/qdrouter.json   | 172 +++++++-----
 .../qpid_dispatch_internal/management/agent.py  |   7 +
 src/CMakeLists.txt                              |   2 +-
 src/router_agent.c                              |   5 +-
 src/router_core/agent.c                         |  18 +-
 src/router_core/agent_router.c                  | 269 -------------------
 src/router_core/agent_router.h                  |  32 ---
 src/router_core/agent_router_stats.c            | 236 ++++++++++++++++
 src/router_core/agent_router_stats.h            |  32 +++
 src/router_core/management_agent.c              |   7 +-
 tests/system_tests_autolinks.py                 |  22 +-
 tests/system_tests_link_routes.py               |  13 +-
 tests/system_tests_management.py                |   3 -
 tests/system_tests_one_router.py                |  42 ++-
 tests/system_tests_qdmanage.py                  |   8 +-
 tests/system_tests_two_routers.py               |   2 +-
 tools/qdstat                                    |   3 +-
 18 files changed, 457 insertions(+), 418 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/6f85537c/include/qpid/dispatch/router_core.h
----------------------------------------------------------------------
diff --git a/include/qpid/dispatch/router_core.h b/include/qpid/dispatch/router_core.h
index 8f144b0..4123fa3 100644
--- a/include/qpid/dispatch/router_core.h
+++ b/include/qpid/dispatch/router_core.h
@@ -653,7 +653,7 @@ typedef enum {
     QD_ROUTER_CONFIG_LINK_ROUTE,
     QD_ROUTER_CONFIG_AUTO_LINK,
     QD_ROUTER_CONNECTION,
-    QD_ROUTER_ROUTER,
+    QD_ROUTER_ROUTER_STATS,
     QD_ROUTER_LINK,
     QD_ROUTER_ADDRESS,
     QD_ROUTER_EXCHANGE,

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/6f85537c/python/qpid_dispatch/management/qdrouter.json
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch/management/qdrouter.json b/python/qpid_dispatch/management/qdrouter.json
index a5262f7..ed76442 100644
--- a/python/qpid_dispatch/management/qdrouter.json
+++ b/python/qpid_dispatch/management/qdrouter.json
@@ -431,37 +431,107 @@
                     "description": "Time in seconds after which link state is declared stale if no RA is received.",
                     "create": true
                 },
-                "addrCount": {
-                    "type": "integer",
-                    "description":"Number of addresses known to the router.",
-                    "graph": true
-                },
-                "linkCount": {
+                "workerThreads": {
                     "type": "integer",
-                    "description":"Number of links attached to the router node.",
-                    "graph": true
+                    "default": 4,
+                    "description": "The number of threads that will be created to process message traffic and other application work (timers, non-amqp file descriptors, etc.) .",
+                    "create": true
                 },
-                "nodeCount": {
-                    "type": "integer",
-                    "description":"Number of known peer router nodes.",
-                    "graph": true
+                "debugDump": {
+                    "type": "path",
+                    "description": "The absolute path to the location for the debug dump file. The router writes debug-level information to this file if the logger is not available.",
+                    "create": true
                 },
-                "linkRouteCount": {
-                    "type": "integer",
-                    "description":"Number of link routes attached to the router node.",
-                    "graph": true
+                "saslConfigPath": {
+                    "type": "path",
+                    "description": "Absolute path to the SASL configuration file.",
+                    "required": false,
+                    "create": true
                 },
-                "autoLinkCount": {
-                    "type": "integer",
-                    "description":"Number of auto links attached to the router node.",
-                    "graph": true
+                "saslConfigName": {
+                    "type": "string",
+                    "description": "Name of the SASL configuration.  This string + '.conf' is the name of the configuration file.",
+                    "default": "qdrouterd",
+                    "required": false,
+                    "create": true
                 },
-                "connectionCount": {
-                    "type": "integer",
-                    "description":"Number of open connections to the router node.",
-                    "graph": true
+                "allowResumableLinkRoute": {
+                    "type": "boolean",
+                    "description": "Whether links can be routed where timeout is non-zero or expiry-policy is not link-detach",
+                    "create": true,
+                    "required": false,
+                    "default": true
+                },                
+                "allowUnsettledMulticast": {
+                    "type": "boolean",
+                    "description": "If true, allow senders to send unsettled deliveries to multicast addresses.  These deliveries shall be settled by the ingress router.  If false, unsettled deliveries to multicast addresses shall be rejected.",
+                    "create": true,
+                    "required": false,
+                    "default": false
                 },
-
+                "defaultDistribution": {
+                    "type": ["multicast", "closest", "balanced", "unavailable"],
+                    "description": "Default forwarding treatment for any address without a specified treatment. multicast - one copy of each message delivered to all subscribers; closest - messages delivered to only the closest subscriber; balanced - messages delivered to one subscriber with load balanced across subscribers; unavailable - this address is unavailable, link attaches to an address of unavilable distribution will be rejected.",
+                    "create": true,
+                    "required": false,
+                    "default": "balanced"
+                }
+            }
+        },
+        
+        "routerStats": {
+            "description": "Overall router statistics.",
+            "extends": "operationalEntity",
+            "attributes": {
+	            "id": {
+	                "description":"Router's unique identity. The router will fail to start without id.",
+	                "type": "string",
+	                "required": false,
+	                "create": true
+	            },
+	            "mode": {
+	                "type": [
+	                    "standalone",
+	                    "interior"
+	                ],
+	                "default": "standalone",
+	                "description": "In standalone mode, the router operates as a single component.  It does not participate in the routing protocol and therefore will not cooperate with other routers. In interior mode, the router operates in cooperation with other interior routers in an interconnected network.",
+	                "create": true
+	            },
+	            "version": {
+	                "type": "string",
+	                "description": "Software Version"
+	            },
+	            "addrCount": {
+	                "type": "integer",
+	                "description":"Number of addresses known to the router.",
+	                "graph": true
+	            },
+	            "linkCount": {
+	                "type": "integer",
+	                "description":"Number of links attached to the router node.",
+	                "graph": true
+	            },
+	            "nodeCount": {
+	                "type": "integer",
+	                "description":"Number of known peer router nodes.",
+	                "graph": true
+	            },
+	            "linkRouteCount": {
+	                "type": "integer",
+	                "description":"Number of link routes attached to the router node.",
+	                "graph": true
+	            },
+	            "autoLinkCount": {
+	                "type": "integer",
+	                "description":"Number of auto links attached to the router node.",
+	                "graph": true
+	            },
+	            "connectionCount": {
+	                "type": "integer",
+	                "description":"Number of open connections to the router node.",
+	                "graph": true
+	            },
                 "presettledDeliveries": {
                     "type": "integer",
                     "description":"Number of presettled deliveries handled by the router.",
@@ -516,55 +586,9 @@
                     "type": "integer",
                     "description":"Number of deliveries that were sent to route container connections.",
                     "graph": true
-                },                
-                "workerThreads": {
-                    "type": "integer",
-                    "default": 4,
-                    "description": "The number of threads that will be created to process message traffic and other application work (timers, non-amqp file descriptors, etc.) .",
-                    "create": true
-                },
-                "debugDump": {
-                    "type": "path",
-                    "description": "A file to dump debugging information that can't be logged normally.",
-                    "create": true
-                },
-                "saslConfigPath": {
-                    "type": "path",
-                    "description": "Absolute path to the SASL configuration file.",
-                    "required": false,
-                    "create": true
-                },
-                "saslConfigName": {
-                    "type": "string",
-                    "description": "Name of the SASL configuration.  This string + '.conf' is the name of the configuration file.",
-                    "default": "qdrouterd",
-                    "required": false,
-                    "create": true
-                },
-                "allowUnsettledMulticast": {
-                    "type": "boolean",
-                    "description": "If true, allow senders to send unsettled deliveries to multicast addresses.  These deliveries shall be settled by the ingress router.  If false, unsettled deliveries to multicast addresses shall be rejected.",
-                    "create": true,
-                    "required": false,
-                    "default": false
-                },
-                "allowResumableLinkRoute": {
-                    "type": "boolean",
-                    "description": "Whether links can be routed where timeout is non-zero or expiry-policy is not link-detach",
-                    "create": true,
-                    "required": false,
-                    "default": true
-                },
-                "defaultDistribution": {
-                    "type": ["multicast", "closest", "balanced", "unavailable"],
-                    "description": "Default forwarding treatment for any address without a specified treatment. multicast - one copy of each message delivered to all subscribers; closest - messages delivered to only the closest subscriber; balanced - messages delivered to one subscriber with load balanced across subscribers; unavailable - this address is unavailable, link attaches to an address of unavilable distribution will be rejected.",
-                    "create": true,
-                    "required": false,
-                    "default": "balanced"
-                }
-            }
-        },
-
+                }                
+            }        
+        },        
         "sslProfile": {
             "description":"Attributes for setting TLS/SSL configuration for connections.",
             "referential": true,

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/6f85537c/python/qpid_dispatch_internal/management/agent.py
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch_internal/management/agent.py b/python/qpid_dispatch_internal/management/agent.py
index fc4bbae..ffcd6ff 100644
--- a/python/qpid_dispatch_internal/management/agent.py
+++ b/python/qpid_dispatch_internal/management/agent.py
@@ -479,6 +479,13 @@ class LogStatsEntity(EntityAdapter):
     def __str__(self):
         return super(LogStatsEntity, self).__str__().replace("Entity(", "LogStatsEntity(")
 
+class RouterStatsEntity(EntityAdapter):
+    def _identifier(self):
+        return self.attributes.get('identity')
+
+    def __str__(self):
+        return super(RouterStatsEntity, self).__str__().replace("Entity(", "RouterStatsEntity(")
+
 
 class AllocatorEntity(EntityAdapter):
     def _identifier(self):

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/6f85537c/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ac85bca..453e8f3 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -83,7 +83,7 @@ set(qpid_dispatch_SOURCES
   router_core/agent_connection.c
   router_core/agent_config_link_route.c
   router_core/agent_link.c
-  router_core/agent_router.c
+  router_core/agent_router_stats.c
   router_core/connections.c
   router_core/error.c
   router_core/exchange_bindings.c

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/6f85537c/src/router_agent.c
----------------------------------------------------------------------
diff --git a/src/router_agent.c b/src/router_agent.c
index 4e02b77..52d5133 100644
--- a/src/router_agent.c
+++ b/src/router_agent.c
@@ -42,10 +42,7 @@ qd_error_t qd_entity_refresh_router(qd_entity_t* entity, void *impl) {
     qd_dispatch_t *qd = (qd_dispatch_t*) impl;
     qd_router_t *router = qd->router;
     if (qd_entity_set_string(entity, "area", router->router_area) == 0 &&
-        qd_entity_set_string(entity, "mode", qd_router_mode_name(router->router_mode)) == 0 &&
-        qd_entity_set_long(entity, "addrCount", 0) == 0 &&
-        qd_entity_set_long(entity, "linkCount", 0) == 0 &&
-        qd_entity_set_long(entity, "nodeCount", 0) == 0
+        qd_entity_set_string(entity, "mode", qd_router_mode_name(router->router_mode)) == 0
     )
         return QD_ERROR_NONE;
     return qd_error_code();

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/6f85537c/src/router_core/agent.c
----------------------------------------------------------------------
diff --git a/src/router_core/agent.c b/src/router_core/agent.c
index c4dc50d..364aa41 100644
--- a/src/router_core/agent.c
+++ b/src/router_core/agent.c
@@ -23,11 +23,11 @@
 #include "agent_config_auto_link.h"
 #include "agent_address.h"
 #include "agent_link.h"
-#include "agent_router.h"
 #include "agent_connection.h"
 #include "router_core_private.h"
 #include "exchange_bindings.h"
 #include <stdio.h>
+#include "agent_router_stats.h"
 
 static void qdr_manage_read_CT(qdr_core_t *core, qdr_action_t *action, bool discard);
 static void qdr_manage_create_CT(qdr_core_t *core, qdr_action_t *action, bool discard);
@@ -190,7 +190,7 @@ qdr_query_t *qdr_manage_query(qdr_core_t              *core,
     case QD_ROUTER_CONFIG_ADDRESS:    qdr_agent_set_columns(query, attribute_names, qdr_config_address_columns, QDR_CONFIG_ADDRESS_COLUMN_COUNT);  break;
     case QD_ROUTER_CONFIG_LINK_ROUTE: qdr_agent_set_columns(query, attribute_names, qdr_config_link_route_columns, QDR_CONFIG_LINK_ROUTE_COLUMN_COUNT);  break;
     case QD_ROUTER_CONFIG_AUTO_LINK:  qdr_agent_set_columns(query, attribute_names, qdr_config_auto_link_columns, QDR_CONFIG_AUTO_LINK_COLUMN_COUNT);  break;
-    case QD_ROUTER_ROUTER:            qdr_agent_set_columns(query, attribute_names, qdr_router_columns, QDR_ROUTER_COLUMN_COUNT);  break;
+    case QD_ROUTER_ROUTER_STATS:      qdr_agent_set_columns(query, attribute_names, qdr_router_columns, QDR_ROUTER_STATS_COLUMN_COUNT);  break;
     case QD_ROUTER_CONNECTION:        qdr_agent_set_columns(query, attribute_names, qdr_connection_columns, QDR_CONNECTION_COLUMN_COUNT);  break;
     case QD_ROUTER_LINK:              qdr_agent_set_columns(query, attribute_names, qdr_link_columns, QDR_LINK_COLUMN_COUNT);  break;
     case QD_ROUTER_ADDRESS:           qdr_agent_set_columns(query, attribute_names, qdr_address_columns, QDR_ADDRESS_COLUMN_COUNT); break;
@@ -209,7 +209,7 @@ void qdr_query_add_attribute_names(qdr_query_t *query)
     case QD_ROUTER_CONFIG_ADDRESS:    qdr_agent_emit_columns(query, qdr_config_address_columns, QDR_CONFIG_ADDRESS_COLUMN_COUNT); break;
     case QD_ROUTER_CONFIG_LINK_ROUTE: qdr_agent_emit_columns(query, qdr_config_link_route_columns, QDR_CONFIG_LINK_ROUTE_COLUMN_COUNT); break;
     case QD_ROUTER_CONFIG_AUTO_LINK:  qdr_agent_emit_columns(query, qdr_config_auto_link_columns, QDR_CONFIG_AUTO_LINK_COLUMN_COUNT); break;
-    case QD_ROUTER_ROUTER:            qdr_agent_emit_columns(query, qdr_router_columns, QDR_ROUTER_COLUMN_COUNT); break;
+    case QD_ROUTER_ROUTER_STATS:      qdr_agent_emit_columns(query, qdr_router_columns, QDR_ROUTER_STATS_COLUMN_COUNT); break;
     case QD_ROUTER_CONNECTION:        qdr_agent_emit_columns(query, qdr_connection_columns, QDR_CONNECTION_COLUMN_COUNT); break;
     case QD_ROUTER_LINK:              qdr_agent_emit_columns(query, qdr_link_columns, QDR_LINK_COLUMN_COUNT); break;
     case QD_ROUTER_ADDRESS:           qdr_agent_emit_columns(query, qdr_address_columns, QDR_ADDRESS_COLUMN_COUNT); break;
@@ -350,7 +350,7 @@ static void qdr_manage_read_CT(qdr_core_t *core, qdr_action_t *action, bool disc
     case QD_ROUTER_CONFIG_ADDRESS:    qdra_config_address_get_CT(core, name, identity, query, qdr_config_address_columns); break;
     case QD_ROUTER_CONFIG_LINK_ROUTE: qdra_config_link_route_get_CT(core, name, identity, query, qdr_config_link_route_columns); break;
     case QD_ROUTER_CONFIG_AUTO_LINK:  qdra_config_auto_link_get_CT(core, name, identity, query, qdr_config_auto_link_columns); break;
-    case QD_ROUTER_ROUTER:            qdr_agent_forbidden(core, query, false); break;
+    case QD_ROUTER_ROUTER_STATS:      qdr_agent_forbidden(core, query, false); break;
     case QD_ROUTER_CONNECTION:        qdra_connection_get_CT(core, name, identity, query, qdr_connection_columns); break;
     case QD_ROUTER_LINK:              break;
     case QD_ROUTER_ADDRESS:           qdra_address_get_CT(core, name, identity, query, qdr_address_columns); break;
@@ -376,7 +376,7 @@ static void qdr_manage_create_CT(qdr_core_t *core, qdr_action_t *action, bool di
     case QD_ROUTER_CONFIG_LINK_ROUTE: qdra_config_link_route_create_CT(core, name, query, in_body); break;
     case QD_ROUTER_CONFIG_AUTO_LINK:  qdra_config_auto_link_create_CT(core, name, query, in_body); break;
     case QD_ROUTER_CONNECTION:        break;
-    case QD_ROUTER_ROUTER:            qdr_agent_forbidden(core, query, false); break;
+    case QD_ROUTER_ROUTER_STATS:      qdr_agent_forbidden(core, query, false); break;
     case QD_ROUTER_LINK:              break;
     case QD_ROUTER_ADDRESS:           break;
     case QD_ROUTER_FORBIDDEN:         qdr_agent_forbidden(core, query, false); break;
@@ -402,7 +402,7 @@ static void qdr_manage_delete_CT(qdr_core_t *core, qdr_action_t *action, bool di
     case QD_ROUTER_CONFIG_LINK_ROUTE: qdra_config_link_route_delete_CT(core, query, name, identity); break;
     case QD_ROUTER_CONFIG_AUTO_LINK:  qdra_config_auto_link_delete_CT(core, query, name, identity); break;
     case QD_ROUTER_CONNECTION:        break;
-    case QD_ROUTER_ROUTER:            qdr_agent_forbidden(core, query, false); break;
+    case QD_ROUTER_ROUTER_STATS:      qdr_agent_forbidden(core, query, false); break;
     case QD_ROUTER_LINK:              break;
     case QD_ROUTER_ADDRESS:           break;
     case QD_ROUTER_FORBIDDEN:         qdr_agent_forbidden(core, query, false); break;
@@ -426,7 +426,7 @@ static void qdr_manage_update_CT(qdr_core_t *core, qdr_action_t *action, bool di
     case QD_ROUTER_CONFIG_LINK_ROUTE: break;
     case QD_ROUTER_CONFIG_AUTO_LINK:  break;
     case QD_ROUTER_CONNECTION:        break;
-    case QD_ROUTER_ROUTER:            break;
+    case QD_ROUTER_ROUTER_STATS:      break;
     case QD_ROUTER_LINK:              qdra_link_update_CT(core, name, identity, query, in_body); break;
     case QD_ROUTER_ADDRESS:           break;
     case QD_ROUTER_FORBIDDEN:         qdr_agent_forbidden(core, query, false); break;
@@ -452,7 +452,7 @@ static void qdrh_query_get_first_CT(qdr_core_t *core, qdr_action_t *action, bool
         case QD_ROUTER_CONFIG_ADDRESS:    qdra_config_address_get_first_CT(core, query, offset); break;
         case QD_ROUTER_CONFIG_LINK_ROUTE: qdra_config_link_route_get_first_CT(core, query, offset); break;
         case QD_ROUTER_CONFIG_AUTO_LINK:  qdra_config_auto_link_get_first_CT(core, query, offset); break;
-        case QD_ROUTER_ROUTER:            qdra_router_get_first_CT(core, query, offset); break;
+        case QD_ROUTER_ROUTER_STATS:      qdra_router_get_first_CT(core, query, offset); break;
         case QD_ROUTER_CONNECTION:        qdra_connection_get_first_CT(core, query, offset); break;
         case QD_ROUTER_LINK:              qdra_link_get_first_CT(core, query, offset); break;
         case QD_ROUTER_ADDRESS:           qdra_address_get_first_CT(core, query, offset); break;
@@ -473,7 +473,7 @@ static void qdrh_query_get_next_CT(qdr_core_t *core, qdr_action_t *action, bool
         case QD_ROUTER_CONFIG_ADDRESS:    qdra_config_address_get_next_CT(core, query); break;
         case QD_ROUTER_CONFIG_LINK_ROUTE: qdra_config_link_route_get_next_CT(core, query); break;
         case QD_ROUTER_CONFIG_AUTO_LINK:  qdra_config_auto_link_get_next_CT(core, query); break;
-        case QD_ROUTER_ROUTER:            qdra_router_get_next_CT(core, query); break;
+        case QD_ROUTER_ROUTER_STATS:      qdra_router_get_next_CT(core, query); break;
         case QD_ROUTER_CONNECTION:        qdra_connection_get_next_CT(core, query); break;
         case QD_ROUTER_LINK:              qdra_link_get_next_CT(core, query); break;
         case QD_ROUTER_ADDRESS:           qdra_address_get_next_CT(core, query); break;

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/6f85537c/src/router_core/agent_router.c
----------------------------------------------------------------------
diff --git a/src/router_core/agent_router.c b/src/router_core/agent_router.c
deleted file mode 100644
index d4aa99a..0000000
--- a/src/router_core/agent_router.c
+++ /dev/null
@@ -1,269 +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.
- */
-
-#include "agent_router.h"
-#include "config.h"
-#include <inttypes.h>
-#include <stdio.h>
-
-#define QDR_ROUTER_NAME                   0
-#define QDR_ROUTER_IDENTITY               1
-#define QDR_ROUTER_ID                     2
-#define QDR_ROUTER_TYPE                   3
-#define QDR_ROUTER_MODE                   4
-#define QDR_ROUTER_AREA                   5
-#define QDR_ROUTER_VERSION                6
-#define QDR_ROUTER_HELLO_INTERVAL         7
-#define QDR_ROUTER_HELLO_MAX_AGE          8
-#define QDR_ROUTER_RA_INTERVAL            9
-#define QDR_ROUTER_RA_INTERVAL_FLUX       10
-#define QDR_ROUTER_REMOTE_LS_MAX_AGE      11
-#define QDR_ROUTER_ADDR_COUNT             12
-#define QDR_ROUTER_LINK_COUNT             13
-#define QDR_ROUTER_NODE_COUNT             14
-#define QDR_ROUTER_LINK_ROUTE_COUNT       15
-#define QDR_ROUTER_AUTO_LINK_COUNT        16
-#define QDR_ROUTER_WORKER_THREADS         17
-#define QDR_ROUTER_DEBUG_DUMP             18
-#define QDR_ROUTER_SASL_CONFIG_PATH       19
-#define QDR_ROUTER_SASL_CONFIG_NAME       20
-#define QDR_ROUTER_CONNECTION_COUNT       21
-
-#define QDR_ROUTER_PRESETTLED_DELIVERIES              22
-#define QDR_ROUTER_DROPPED_PRESETTLED_DELIVERIES      23
-#define QDR_ROUTER_ACCEPTED_DELIVERIES                24
-#define QDR_ROUTER_REJECTED_DELIVERIES                25
-#define QDR_ROUTER_RELEASED_DELIVERIES                26
-#define QDR_ROUTER_MODIFIED_DELIVERIES                27
-#define QDR_ROUTER_DELIVERIES_INGRESS                 28
-#define QDR_ROUTER_DELIVERIES_EGRESS                  29
-#define QDR_ROUTER_DELIVERIES_TRANSIT                 30
-#define QDR_ROUTER_DELIVERIES_INGRESS_ROUTE_CONTAINER 31
-#define QDR_ROUTER_DELIVERIES_EGRESS_ROUTE_CONTAINER  32
-#define QDR_ROUTER_RESUMABLE_LINK_ROUTE               33
-
-
-const char *qdr_router_columns[] =
-    {"name",
-     "identity",
-     "id",
-     "type",
-     "mode",
-     "area",
-     "version",
-     "helloInterval",
-     "helloMaxAge",
-     "raInterval",
-     "raIntervalFlux",
-     "remoteLsMaxAge",
-     "addrCount",
-     "linkCount",
-     "nodeCount",
-     "linkRouteCount",
-     "autoLinkCount", // The connection id of the owner connection
-     "workerThreads",
-     "debugDump",
-     "saslConfigPath",
-     "saslConfigName",
-     "connectionCount",
-     "presettledDeliveries",
-     "droppedPresettledDeliveries",
-     "acceptedDeliveries",
-     "rejectedDeliveries",
-     "releasedDeliveries",
-     "modifiedDeliveries",
-     "deliveriesIngress",
-     "deliveriesEgress",
-     "deliveriesTransit",
-     "deliveriesIngressRouteContainer",
-     "deliveriesEgressRouteContainer",
-     "resumableLinkRouteDefault",
-     0};
-
-
-static const char *qd_router_mode_names[] = {
-    "standalone",
-    "interior",
-    "edge",
-    "endpoint"
-};
-
-static const char *router_mode(qd_router_mode_t router_mode)
-{
-    return qd_router_mode_names[(int)router_mode];
-
-}
-
-static void qdr_agent_write_column_CT(qd_composed_field_t *body, int col, qdr_core_t *core)
-{
-
-    switch(col) {
-    case QDR_ROUTER_IDENTITY:
-        // There is only one instance of router. Just give it an identity of 1
-        qd_compose_insert_string(body, "1");
-        break;
-    case QDR_ROUTER_TYPE:
-        qd_compose_insert_string(body, "org.apache.qpid.dispatch.router");
-        break;
-
-    case QDR_ROUTER_MODE:
-        qd_compose_insert_string(body, router_mode(core->router_mode));
-        break;
-
-    case QDR_ROUTER_AREA:
-        if (core->router_area)
-            qd_compose_insert_string(body, core->router_area);
-        else
-            qd_compose_insert_null(body);
-        break;
-
-    case QDR_ROUTER_VERSION:
-        qd_compose_insert_string(body, QPID_DISPATCH_VERSION);
-        break;
-
-    case QDR_ROUTER_HELLO_INTERVAL:
-        qd_compose_insert_null(body);
-        break;
-
-    case QDR_ROUTER_ADDR_COUNT:
-        qd_compose_insert_ulong(body, DEQ_SIZE(core->addrs));
-        break;
-
-    case QDR_ROUTER_LINK_COUNT:
-        qd_compose_insert_ulong(body, DEQ_SIZE(core->open_links));
-        break;
-
-    case QDR_ROUTER_NODE_COUNT:
-        qd_compose_insert_ulong(body, DEQ_SIZE(core->routers));
-        break;
-
-    case QDR_ROUTER_CONNECTION_COUNT:
-        qd_compose_insert_ulong(body, DEQ_SIZE(core->open_connections));
-        break;
-
-    case QDR_ROUTER_LINK_ROUTE_COUNT:
-        qd_compose_insert_ulong(body, DEQ_SIZE(core->link_routes));
-        break;
-
-    case QDR_ROUTER_AUTO_LINK_COUNT:
-        qd_compose_insert_ulong(body, DEQ_SIZE(core->auto_links));
-        break;
-
-    case QDR_ROUTER_ID:
-    case QDR_ROUTER_NAME:
-        if (core->router_id)
-            qd_compose_insert_string(body, core->router_id);
-        else
-            qd_compose_insert_null(body);
-        break;
-
-    case QDR_ROUTER_PRESETTLED_DELIVERIES:
-        qd_compose_insert_ulong(body, core->presettled_deliveries);
-        break;
-
-    case QDR_ROUTER_DROPPED_PRESETTLED_DELIVERIES:
-        qd_compose_insert_ulong(body, core->dropped_presettled_deliveries);
-        break;
-
-    case QDR_ROUTER_ACCEPTED_DELIVERIES:
-        qd_compose_insert_ulong(body, core->accepted_deliveries);
-        break;
-
-    case QDR_ROUTER_REJECTED_DELIVERIES:
-        qd_compose_insert_ulong(body, core->rejected_deliveries);
-        break;
-
-    case QDR_ROUTER_RELEASED_DELIVERIES:
-        qd_compose_insert_ulong(body, core->released_deliveries);
-        break;
-
-    case QDR_ROUTER_MODIFIED_DELIVERIES:
-        qd_compose_insert_ulong(body, core->modified_deliveries);
-        break;
-
-    case QDR_ROUTER_DELIVERIES_INGRESS:
-        qd_compose_insert_ulong(body, core->deliveries_ingress);
-        break;
-
-    case QDR_ROUTER_DELIVERIES_EGRESS:
-        qd_compose_insert_ulong(body, core->deliveries_egress);
-        break;
-
-    case QDR_ROUTER_DELIVERIES_TRANSIT:
-        qd_compose_insert_ulong(body, core->deliveries_transit);
-        break;
-
-    case QDR_ROUTER_DELIVERIES_INGRESS_ROUTE_CONTAINER:
-        qd_compose_insert_ulong(body, core->deliveries_ingress_route_container);
-        break;
-
-    case QDR_ROUTER_DELIVERIES_EGRESS_ROUTE_CONTAINER:
-        qd_compose_insert_ulong(body, core->deliveries_egress_route_container);
-        break;
-
-    default:
-        qd_compose_insert_null(body);
-        break;
-    }
-}
-
-
-
-static void qdr_agent_write_router_CT(qdr_query_t *query,  qdr_core_t *core)
-{
-    qd_composed_field_t *body = query->body;
-
-    qd_compose_start_list(body);
-    int i = 0;
-    while (query->columns[i] >= 0) {
-        qdr_agent_write_column_CT(body, query->columns[i], core);
-        i++;
-    }
-    qd_compose_end_list(body);
-}
-
-void qdra_router_get_first_CT(qdr_core_t *core, qdr_query_t *query, int offset)
-{
-    //
-    // Queries that get this far will always succeed.
-    //
-    query->status = QD_AMQP_OK;
-
-    if (offset >= 1) {
-        query->more = false;
-        qdr_agent_enqueue_response_CT(core, query);
-        return;
-    }
-
-    //
-    // Write the columns of core into the response body.
-    //
-    qdr_agent_write_router_CT(query, core);
-
-    //
-    // Enqueue the response.
-    //
-    qdr_agent_enqueue_response_CT(core, query);
-}
-
-// Nothing to do here. The router has only one entry.
-void qdra_router_get_next_CT(qdr_core_t *core, qdr_query_t *query)
-{
-
-}

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/6f85537c/src/router_core/agent_router.h
----------------------------------------------------------------------
diff --git a/src/router_core/agent_router.h b/src/router_core/agent_router.h
deleted file mode 100644
index 3019672..0000000
--- a/src/router_core/agent_router.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef qdr_agent_router
-#define qdr_agent_router 1
-/*
- * 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.
- */
-
-#include "router_core_private.h"
-
-#define QDR_ROUTER_COLUMN_COUNT  34
-
-const char *qdr_router_columns[QDR_ROUTER_COLUMN_COUNT + 1];
-
-void qdra_router_get_first_CT(qdr_core_t *core, qdr_query_t *query, int offset);
-void qdra_router_get_next_CT(qdr_core_t *core, qdr_query_t *query);
-void qdra_router_get_next_CT(qdr_core_t *core, qdr_query_t *query);
-
-#endif

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/6f85537c/src/router_core/agent_router_stats.c
----------------------------------------------------------------------
diff --git a/src/router_core/agent_router_stats.c b/src/router_core/agent_router_stats.c
new file mode 100644
index 0000000..53141a8
--- /dev/null
+++ b/src/router_core/agent_router_stats.c
@@ -0,0 +1,236 @@
+/*
+ * 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.
+ */
+
+#include "agent_router_stats.h"
+#include "config.h"
+#include <inttypes.h>
+#include <stdio.h>
+
+
+#define QDR_ROUTER_NAME                                0
+#define QDR_ROUTER_IDENTITY                            1
+#define QDR_ROUTER_ID                                  2
+#define QDR_ROUTER_STATS_TYPE                          3
+#define QDR_ROUTER_MODE                                4
+#define QDR_ROUTER_VERSION                             5
+#define QDR_ROUTER_ADDR_COUNT                          6
+#define QDR_ROUTER_LINK_COUNT                          7
+#define QDR_ROUTER_NODE_COUNT                          8
+#define QDR_ROUTER_LINK_ROUTE_COUNT                    9
+#define QDR_ROUTER_AUTO_LINK_COUNT                    10
+#define QDR_ROUTER_CONNECTION_COUNT                   11
+#define QDR_ROUTER_PRESETTLED_DELIVERIES              12
+#define QDR_ROUTER_DROPPED_PRESETTLED_DELIVERIES      13
+#define QDR_ROUTER_ACCEPTED_DELIVERIES                14
+#define QDR_ROUTER_REJECTED_DELIVERIES                15
+#define QDR_ROUTER_RELEASED_DELIVERIES                16
+#define QDR_ROUTER_MODIFIED_DELIVERIES                17
+#define QDR_ROUTER_DELIVERIES_INGRESS                 18
+#define QDR_ROUTER_DELIVERIES_EGRESS                  19
+#define QDR_ROUTER_DELIVERIES_TRANSIT                 20
+#define QDR_ROUTER_DELIVERIES_INGRESS_ROUTE_CONTAINER 21
+#define QDR_ROUTER_DELIVERIES_EGRESS_ROUTE_CONTAINER  22
+
+
+const char *qdr_router_columns[] =
+    {"name",
+     "identity",
+     "id",
+     "type",
+     "mode",
+     "version",
+     "addrCount",
+     "linkCount",
+     "nodeCount",
+     "linkRouteCount",
+     "autoLinkCount",
+     "connectionCount",
+     "presettledDeliveries",
+     "droppedPresettledDeliveries",
+     "acceptedDeliveries",
+     "rejectedDeliveries",
+     "releasedDeliveries",
+     "modifiedDeliveries",
+     "deliveriesIngress",
+     "deliveriesEgress",
+     "deliveriesTransit",
+     "deliveriesIngressRouteContainer",
+     "deliveriesEgressRouteContainer",
+     0};
+
+
+static const char *qd_router_mode_names[] = {
+    "standalone",
+    "interior",
+    "edge",
+    "endpoint"
+};
+
+static const char *router_mode(qd_router_mode_t router_mode)
+{
+    return qd_router_mode_names[(int)router_mode];
+
+}
+
+static void qdr_agent_write_column_CT(qd_composed_field_t *body, int col, qdr_core_t *core)
+{
+
+    switch(col) {
+    case QDR_ROUTER_IDENTITY:
+        // There is only one instance of router. Just give it an identity of 1
+        qd_compose_insert_string(body, "1");
+        break;
+    case QDR_ROUTER_STATS_TYPE:
+        qd_compose_insert_string(body, "org.apache.qpid.dispatch.routerStats");
+        break;
+
+    case QDR_ROUTER_MODE:
+        qd_compose_insert_string(body, router_mode(core->router_mode));
+        break;
+
+    case QDR_ROUTER_VERSION:
+        qd_compose_insert_string(body, QPID_DISPATCH_VERSION);
+        break;
+
+    case QDR_ROUTER_ADDR_COUNT:
+        qd_compose_insert_ulong(body, DEQ_SIZE(core->addrs));
+        break;
+
+    case QDR_ROUTER_LINK_COUNT:
+        qd_compose_insert_ulong(body, DEQ_SIZE(core->open_links));
+        break;
+
+    case QDR_ROUTER_NODE_COUNT:
+        qd_compose_insert_ulong(body, DEQ_SIZE(core->routers));
+        break;
+
+    case QDR_ROUTER_CONNECTION_COUNT:
+        qd_compose_insert_ulong(body, DEQ_SIZE(core->open_connections));
+        break;
+
+    case QDR_ROUTER_LINK_ROUTE_COUNT:
+        qd_compose_insert_ulong(body, DEQ_SIZE(core->link_routes));
+        break;
+
+    case QDR_ROUTER_AUTO_LINK_COUNT:
+        qd_compose_insert_ulong(body, DEQ_SIZE(core->auto_links));
+        break;
+
+    case QDR_ROUTER_ID:
+    case QDR_ROUTER_NAME:
+        if (core->router_id)
+            qd_compose_insert_string(body, core->router_id);
+        else
+            qd_compose_insert_null(body);
+        break;
+
+    case QDR_ROUTER_PRESETTLED_DELIVERIES:
+        qd_compose_insert_ulong(body, core->presettled_deliveries);
+        break;
+
+    case QDR_ROUTER_DROPPED_PRESETTLED_DELIVERIES:
+        qd_compose_insert_ulong(body, core->dropped_presettled_deliveries);
+        break;
+
+    case QDR_ROUTER_ACCEPTED_DELIVERIES:
+        qd_compose_insert_ulong(body, core->accepted_deliveries);
+        break;
+
+    case QDR_ROUTER_REJECTED_DELIVERIES:
+        qd_compose_insert_ulong(body, core->rejected_deliveries);
+        break;
+
+    case QDR_ROUTER_RELEASED_DELIVERIES:
+        qd_compose_insert_ulong(body, core->released_deliveries);
+        break;
+
+    case QDR_ROUTER_MODIFIED_DELIVERIES:
+        qd_compose_insert_ulong(body, core->modified_deliveries);
+        break;
+
+    case QDR_ROUTER_DELIVERIES_INGRESS:
+        qd_compose_insert_ulong(body, core->deliveries_ingress);
+        break;
+
+    case QDR_ROUTER_DELIVERIES_EGRESS:
+        qd_compose_insert_ulong(body, core->deliveries_egress);
+        break;
+
+    case QDR_ROUTER_DELIVERIES_TRANSIT:
+        qd_compose_insert_ulong(body, core->deliveries_transit);
+        break;
+
+    case QDR_ROUTER_DELIVERIES_INGRESS_ROUTE_CONTAINER:
+        qd_compose_insert_ulong(body, core->deliveries_ingress_route_container);
+        break;
+
+    case QDR_ROUTER_DELIVERIES_EGRESS_ROUTE_CONTAINER:
+        qd_compose_insert_ulong(body, core->deliveries_egress_route_container);
+        break;
+
+    default:
+        qd_compose_insert_null(body);
+        break;
+    }
+}
+
+
+
+static void qdr_agent_write_router_CT(qdr_query_t *query,  qdr_core_t *core)
+{
+    qd_composed_field_t *body = query->body;
+
+    qd_compose_start_list(body);
+    int i = 0;
+    while (query->columns[i] >= 0) {
+        qdr_agent_write_column_CT(body, query->columns[i], core);
+        i++;
+    }
+    qd_compose_end_list(body);
+}
+
+void qdra_router_get_first_CT(qdr_core_t *core, qdr_query_t *query, int offset)
+{
+    //
+    // Queries that get this far will always succeed.
+    //
+    query->status = QD_AMQP_OK;
+
+    if (offset >= 1) {
+        query->more = false;
+        qdr_agent_enqueue_response_CT(core, query);
+        return;
+    }
+
+    //
+    // Write the columns of core into the response body.
+    //
+    qdr_agent_write_router_CT(query, core);
+
+    //
+    // Enqueue the response.
+    //
+    qdr_agent_enqueue_response_CT(core, query);
+}
+
+// Nothing to do here. The router has only one entry.
+void qdra_router_get_next_CT(qdr_core_t *core, qdr_query_t *query)
+{
+
+}

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/6f85537c/src/router_core/agent_router_stats.h
----------------------------------------------------------------------
diff --git a/src/router_core/agent_router_stats.h b/src/router_core/agent_router_stats.h
new file mode 100644
index 0000000..731403c
--- /dev/null
+++ b/src/router_core/agent_router_stats.h
@@ -0,0 +1,32 @@
+#ifndef qdr_agent_router
+#define qdr_agent_router 1
+/*
+ * 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.
+ */
+
+#include "router_core_private.h"
+
+#define QDR_ROUTER_STATS_COLUMN_COUNT  23
+
+const char *qdr_router_columns[QDR_ROUTER_STATS_COLUMN_COUNT + 1];
+
+void qdra_router_get_first_CT(qdr_core_t *core, qdr_query_t *query, int offset);
+void qdra_router_get_next_CT(qdr_core_t *core, qdr_query_t *query);
+void qdra_router_get_next_CT(qdr_core_t *core, qdr_query_t *query);
+
+#endif

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/6f85537c/src/router_core/management_agent.c
----------------------------------------------------------------------
diff --git a/src/router_core/management_agent.c b/src/router_core/management_agent.c
index 737a096..1ca848e 100644
--- a/src/router_core/management_agent.c
+++ b/src/router_core/management_agent.c
@@ -40,13 +40,14 @@ const char *IDENTITY = "identity";
 const char *OPERATION = "operation";
 const char *ATTRIBUTE_NAMES = "attributeNames";
 
+
 const unsigned char *config_address_entity_type  = (unsigned char*) "org.apache.qpid.dispatch.router.config.address";
 const unsigned char *link_route_entity_type      = (unsigned char*) "org.apache.qpid.dispatch.router.config.linkRoute";
 const unsigned char *auto_link_entity_type       = (unsigned char*) "org.apache.qpid.dispatch.router.config.autoLink";
 const unsigned char *address_entity_type         = (unsigned char*) "org.apache.qpid.dispatch.router.address";
 const unsigned char *link_entity_type            = (unsigned char*) "org.apache.qpid.dispatch.router.link";
 const unsigned char *console_entity_type         = (unsigned char*) "org.apache.qpid.dispatch.console";
-const unsigned char *router_entity_type          = (unsigned char*) "org.apache.qpid.dispatch.router";
+const unsigned char *router_stats_entity_type   = (unsigned char*) "org.apache.qpid.dispatch.routerStats";
 const unsigned char *connection_entity_type      = (unsigned char*) "org.apache.qpid.dispatch.connection";
 const unsigned char *config_exchange_entity_type = (unsigned char*) "org.apache.qpid.dispatch.router.config.exchange";
 const unsigned char *config_binding_entity_type  = (unsigned char*) "org.apache.qpid.dispatch.router.config.binding";
@@ -428,8 +429,8 @@ static bool qd_can_handle_request(qd_parsed_field_t           *properties_fld,
         *entity_type = QD_ROUTER_CONFIG_LINK_ROUTE;
     else if (qd_iterator_equal(qd_parse_raw(parsed_field), auto_link_entity_type))
         *entity_type = QD_ROUTER_CONFIG_AUTO_LINK;
-    else if (qd_iterator_equal(qd_parse_raw(parsed_field), router_entity_type))
-        *entity_type = QD_ROUTER_ROUTER;
+    else if (qd_iterator_equal(qd_parse_raw(parsed_field), router_stats_entity_type))
+        *entity_type = QD_ROUTER_ROUTER_STATS;
     else if (qd_iterator_equal(qd_parse_raw(parsed_field), console_entity_type))
         *entity_type = QD_ROUTER_FORBIDDEN;
     else if (qd_iterator_equal(qd_parse_raw(parsed_field), connection_entity_type))

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/6f85537c/tests/system_tests_autolinks.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_autolinks.py b/tests/system_tests_autolinks.py
index a2c1035..8b4d3ea 100644
--- a/tests/system_tests_autolinks.py
+++ b/tests/system_tests_autolinks.py
@@ -24,11 +24,11 @@ from system_test import TestCase, Qdrouterd, main_module, TIMEOUT, Process
 from proton.handlers import MessagingHandler
 from proton.reactor import Container
 from subprocess import PIPE, STDOUT
+from qpid_dispatch.management.client import Node
 
 CONNECTION_PROPERTIES = {u'connection': u'properties', u'int_property': 6451}
 
 
-
 class AutolinkTest(TestCase):
     """System tests involving a single router"""
     @classmethod
@@ -117,13 +117,7 @@ class AutolinkTest(TestCase):
         test = AutolinkCreditTest(self.normal_address, self.route_address)
         test.run()
         self.assertEqual(None, test.error)
-
-        long_type = 'org.apache.qpid.dispatch.router'
-        query_command = 'QUERY --type=' + long_type
-        output = json.loads(self.run_qdmanage(query_command))
-
-        self.assertEqual(output[0]['deliveriesIngress'], 1)
-        self.assertEqual(output[0]['deliveriesEgress'], 0)
+        self.assertTrue(test.autolink_count_ok)
 
     def test_03_autolink_sender(self):
         """
@@ -134,7 +128,7 @@ class AutolinkTest(TestCase):
         test.run()
         self.assertEqual(None, test.error)
 
-        long_type = 'org.apache.qpid.dispatch.router'
+        long_type = 'org.apache.qpid.dispatch.routerStats'
         query_command = 'QUERY --type=' + long_type
         output = json.loads(self.run_qdmanage(query_command))
         self.assertEqual(output[0]['deliveriesEgressRouteContainer'], 275)
@@ -153,7 +147,7 @@ class AutolinkTest(TestCase):
         test.run()
         self.assertEqual(None, test.error)
 
-        long_type = 'org.apache.qpid.dispatch.router'
+        long_type = 'org.apache.qpid.dispatch.routerStats'
         query_command = 'QUERY --type=' + long_type
         output = json.loads(self.run_qdmanage(query_command))
         self.assertEqual(output[0]['deliveriesEgressRouteContainer'], 275)
@@ -282,6 +276,7 @@ class AutolinkCreditTest(MessagingHandler):
         self.route_conn     = None
         self.error          = None
         self.last_action    = "None"
+        self.autolink_count_ok = False
 
     def timeout(self):
         self.error = "Timeout Expired: last_action=%s" % self.last_action
@@ -296,6 +291,13 @@ class AutolinkCreditTest(MessagingHandler):
         self.sender      = event.container.create_sender(self.normal_conn, self.dest)
         self.last_action = "Attached normal sender"
 
+        local_node = Node.connect(self.normal_address, timeout=TIMEOUT)
+        res = local_node.query(type='org.apache.qpid.dispatch.routerStats')
+        results = res.results[0]
+        attribute_names = res.attribute_names
+        if 6 == results[attribute_names.index('autoLinkCount')]:
+            self.autolink_count_ok = True
+
     def on_link_opening(self, event):
         if event.sender:
             event.sender.source.address = event.sender.remote_source.address

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/6f85537c/tests/system_tests_link_routes.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_link_routes.py b/tests/system_tests_link_routes.py
index f882329..3c737c3 100644
--- a/tests/system_tests_link_routes.py
+++ b/tests/system_tests_link_routes.py
@@ -578,11 +578,15 @@ class LinkRouteTest(TestCase):
         We are deleting the link route using qdmanage short name. This should be the last test to run
         """
 
-        # First delete linkRoutes on QDR.B
         local_node = Node.connect(self.routers[1].addresses[0], timeout=TIMEOUT)
+        res = local_node.query(type='org.apache.qpid.dispatch.routerStats')
+        results = res.results[0]
+        attribute_list = res.attribute_names
+
         result_list = local_node.query(type='org.apache.qpid.dispatch.router.config.linkRoute').results
-        self.assertEqual(8, len(result_list))
+        self.assertEqual(results[attribute_list.index('linkRouteCount')], len(result_list))
 
+        # First delete linkRoutes on QDR.B
         for rid in range(8):
             cmd = 'DELETE --type=linkRoute --identity=' + result_list[rid][1]
             self.run_qdmanage(cmd=cmd, address=self.routers[1].addresses[0])
@@ -613,6 +617,11 @@ class LinkRouteTest(TestCase):
         out = self.run_qdmanage(cmd=cmd, address=addr)
         self.assertEquals(out.rstrip(), '[]')
 
+        res = local_node.query(type='org.apache.qpid.dispatch.routerStats')
+        results = res.results[0]
+        attribute_list = res.attribute_names
+        self.assertEqual(results[attribute_list.index('linkRouteCount')], 0)
+
         blocking_connection = BlockingConnection(addr, timeout=3)
 
         # Receive on org.apache.dev (this address used to be linkRouted but not anymore since we deleted linkRoutes

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/6f85537c/tests/system_tests_management.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_management.py b/tests/system_tests_management.py
index 256a1ce..626f6d5 100644
--- a/tests/system_tests_management.py
+++ b/tests/system_tests_management.py
@@ -356,9 +356,6 @@ class ManagementTest(system_test.TestCase):
         entities = self.node.query().get_entities()
         routers = [e for e in entities if e.type == ROUTER]
         self.assertEqual(1, len(routers))
-        router = routers[0]
-        self.assertEqual(router.linkCount, len([e for e in entities if e.type == LINK]))
-        self.assertEqual(router.addrCount, len([e for e in entities if e.type == ADDRESS]))
 
     def test_router_node(self):
         """Test node entity in a trio of linked routers"""

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/6f85537c/tests/system_tests_one_router.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_one_router.py b/tests/system_tests_one_router.py
index 3d79160..18a273b 100644
--- a/tests/system_tests_one_router.py
+++ b/tests/system_tests_one_router.py
@@ -1161,6 +1161,38 @@ class OneRouterTest(TestCase):
         self.assertTrue(test.received_error)
         self.assertTrue(test.reject_count_match)
 
+    def test_query_router(self):
+        """
+        Query the router with type='org.apache.qpid.dispatch.router' and make sure everything matches up as expected.
+        """
+        local_node = Node.connect(self.address, timeout=TIMEOUT)
+        outs = local_node.query(type='org.apache.qpid.dispatch.router')
+        debug_dump = outs.attribute_names.index('debugDump')
+        ra_interval_flux = outs.attribute_names.index('raIntervalFlux')
+        worker_threads = outs.attribute_names.index('workerThreads')
+        name = outs.attribute_names.index('name')
+        hello_interbval = outs.attribute_names.index('helloInterval')
+        area = outs.attribute_names.index('area')
+        hello_max_age = outs.attribute_names.index('helloMaxAge')
+        sasl_config_name = outs.attribute_names.index('saslConfigName')
+        remote_ls_max_age = outs.attribute_names.index('remoteLsMaxAge')
+        default_distribution = outs.attribute_names.index('defaultDistribution')
+        ra_interval = outs.attribute_names.index('raInterval')
+        mode = outs.attribute_names.index('mode')
+
+        self.assertEqual(outs.results[0][debug_dump], 'qddebug.txt')
+        self.assertEqual(outs.results[0][ra_interval_flux], 4)
+        self.assertEqual(outs.results[0][worker_threads], 4)
+        self.assertEqual(outs.results[0][name], 'router/QDR')
+        self.assertEqual(outs.results[0][hello_interbval], 1)
+        self.assertEqual(outs.results[0][area], '0')
+        self.assertEqual(outs.results[0][hello_max_age], 3)
+        self.assertEqual(outs.results[0][sasl_config_name], 'qdrouterd')
+        self.assertEqual(outs.results[0][remote_ls_max_age], 60)
+        self.assertEqual(outs.results[0][default_distribution], 'balanced')
+        self.assertEqual(outs.results[0][ra_interval], 30)
+        self.assertEqual(outs.results[0][mode], 'standalone')
+
     def test_connection_properties_unicode_string(self):
         """
         Tests connection property that is a map of unicode strings and integers
@@ -1562,7 +1594,7 @@ class MulticastUnsettledNoReceiverTest(MessagingHandler):
                         if result[16] != 250:
                             self.error = "Expected 250 dropped presettled deliveries but got " + str(result[16])
                         else:
-                            outs = local_node.query(type='org.apache.qpid.dispatch.router')
+                            outs = local_node.query(type='org.apache.qpid.dispatch.routerStats')
                             pos = outs.attribute_names.index("droppedPresettledDeliveries")
                             results = outs.results[0]
                             if results[pos] != 250:
@@ -1617,7 +1649,7 @@ class ReleasedVsModifiedTest(MessagingHandler):
     def check_if_done(self):
         if self.n_received == self.accept and self.n_released == self.count - self.accept and self.n_modified == self.accept:
             local_node = Node.connect(self.address, timeout=TIMEOUT)
-            outs = local_node.query(type='org.apache.qpid.dispatch.router')
+            outs = local_node.query(type='org.apache.qpid.dispatch.routerStats')
             pos = outs.attribute_names.index("modifiedDeliveries")
             results = outs.results[0]
             if results[pos] == self.accept:
@@ -1733,7 +1765,7 @@ class BatchedSettlementTest(MessagingHandler):
     def check_if_done(self):
         if self.n_settled == self.count:
             local_node = Node.connect(self.address, timeout=TIMEOUT)
-            outs = local_node.query(type='org.apache.qpid.dispatch.router')
+            outs = local_node.query(type='org.apache.qpid.dispatch.routerStats')
             pos = outs.attribute_names.index("acceptedDeliveries")
             results = outs.results[0]
             if results >= self.count:
@@ -1883,7 +1915,7 @@ class PresettledOverflowTest(MessagingHandler):
                         if result[16] != 250:
                             self.error = "Expected 250 dropped presettled deliveries but got " + str(result[16])
                         else:
-                            outs = local_node.query(type='org.apache.qpid.dispatch.router')
+                            outs = local_node.query(type='org.apache.qpid.dispatch.routerStats')
                             pos = outs.attribute_names.index("droppedPresettledDeliveries")
                             results = outs.results[0]
                             # There is 250 from a previous test
@@ -1924,7 +1956,7 @@ class RejectDispositionTest(MessagingHandler):
             self.received_error = True
 
         local_node = Node.connect(self.address, timeout=TIMEOUT)
-        outs = local_node.query(type='org.apache.qpid.dispatch.router')
+        outs = local_node.query(type='org.apache.qpid.dispatch.routerStats')
         pos = outs.attribute_names.index("rejectedDeliveries")
         results = outs.results[0]
         if results[pos] == 2:

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/6f85537c/tests/system_tests_qdmanage.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_qdmanage.py b/tests/system_tests_qdmanage.py
index 521ab24..c3c482a 100644
--- a/tests/system_tests_qdmanage.py
+++ b/tests/system_tests_qdmanage.py
@@ -177,15 +177,19 @@ class QdmanageTest(TestCase):
 
     def test_get_types(self):
         out = json.loads(self.run_qdmanage("get-types"))
-        self.assertEqual(len(out), 28)
+        self.assertEqual(len(out), 29)
 
     def test_get_attributes(self):
         out = json.loads(self.run_qdmanage("get-attributes"))
         self.assertEqual(len(out), 28)
 
+    def test_get_attributes(self):
+        out = json.loads(self.run_qdmanage("get-attributes"))
+        self.assertEqual(len(out), 29)
+
     def test_get_operations(self):
         out = json.loads(self.run_qdmanage("get-operations"))
-        self.assertEqual(len(out), 28)
+        self.assertEqual(len(out), 29)
         self.assertEqual(out['org.apache.qpid.dispatch.sslProfile'], [u'CREATE', u'DELETE', u'READ'])
 
     def test_get_types_with_ssl_profile_type(self):

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/6f85537c/tests/system_tests_two_routers.py
----------------------------------------------------------------------
diff --git a/tests/system_tests_two_routers.py b/tests/system_tests_two_routers.py
index 7aa3096..b53cfa7 100644
--- a/tests/system_tests_two_routers.py
+++ b/tests/system_tests_two_routers.py
@@ -126,7 +126,7 @@ class TwoRouterTest(TestCase):
         M2.stop()
 
         local_node = Node.connect(self.routers[0].addresses[0], timeout=TIMEOUT)
-        outs = local_node.query(type='org.apache.qpid.dispatch.router')
+        outs = local_node.query(type='org.apache.qpid.dispatch.routerStats')
 
         # deliveriesTransit must most surely be greater than num_msgs
         pos = outs.attribute_names.index("deliveriesTransit")

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/6f85537c/tools/qdstat
----------------------------------------------------------------------
diff --git a/tools/qdstat b/tools/qdstat
index 93cc8cc..0b0c96e 100755
--- a/tools/qdstat
+++ b/tools/qdstat
@@ -229,12 +229,11 @@ class BusManager(Node):
         heads.append(Header("value"))
         rows = []
 
-        objects = self.query('org.apache.qpid.dispatch.router')
+        objects = self.query('org.apache.qpid.dispatch.routerStats')
 
         router = objects[0]
         rows.append(('Version',       router.version))
         rows.append(('Mode',          router.mode))
-        rows.append(('Area',          router.area))
         rows.append(('Router Id',     router.id))
         rows.append(('Link Routes',   router.linkRouteCount))
         rows.append(('Auto Links',    router.autoLinkCount))


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org