You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2016/03/08 20:32:14 UTC

[3/3] qpid-dispatch git commit: DISPATCH-197 - Expose routed-link peers via management for tracing routed links.

DISPATCH-197 - Expose routed-link peers via management for tracing routed links.


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

Branch: refs/heads/tross-DISPATCH-179-1
Commit: 3bdc04fe8e24a686f9635745b58fa75315bc2909
Parents: a12a085
Author: Ted Ross <tr...@redhat.com>
Authored: Tue Mar 8 14:30:12 2016 -0500
Committer: Ted Ross <tr...@redhat.com>
Committed: Tue Mar 8 14:30:12 2016 -0500

----------------------------------------------------------------------
 python/qpid_dispatch/management/qdrouter.json |  4 ++++
 src/router_core/agent_link.c                  | 21 ++++++++++++++++-----
 src/router_core/agent_link.h                  |  2 +-
 tools/qdstat                                  |  4 +++-
 4 files changed, 24 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3bdc04fe/python/qpid_dispatch/management/qdrouter.json
----------------------------------------------------------------------
diff --git a/python/qpid_dispatch/management/qdrouter.json b/python/qpid_dispatch/management/qdrouter.json
index 58e7f75..f558ee2 100644
--- a/python/qpid_dispatch/management/qdrouter.json
+++ b/python/qpid_dispatch/management/qdrouter.json
@@ -903,6 +903,10 @@
                     "type": "integer",
                     "description": "The capacity, in deliveries, for the link.  The number of undelivered plus unsettled deliveries shall not exceed the capacity.  This is enforced by link flow control."
                 },
+                "peer": {
+                    "type": "string",
+                    "description": "Identifier of the paired link if this is an attach-routed link."
+                },
                 "undeliveredCount": {
                     "type": "integer",
                     "description": "The number of undelivered messages pending for the link."

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3bdc04fe/src/router_core/agent_link.c
----------------------------------------------------------------------
diff --git a/src/router_core/agent_link.c b/src/router_core/agent_link.c
index 9eee88f..bfeaa89 100644
--- a/src/router_core/agent_link.c
+++ b/src/router_core/agent_link.c
@@ -28,11 +28,12 @@
 #define QDR_LINK_LINK_DIR           5
 #define QDR_LINK_OWNING_ADDR        6
 #define QDR_LINK_CAPACITY           7
-#define QDR_LINK_UNDELIVERED_COUNT  8
-#define QDR_LINK_UNSETTLED_COUNT    9
-#define QDR_LINK_DELIVERY_COUNT     10
-#define QDR_LINK_ADMIN_STATE        11
-#define QDR_LINK_OPER_STATE         12
+#define QDR_LINK_PEER               8
+#define QDR_LINK_UNDELIVERED_COUNT  9
+#define QDR_LINK_UNSETTLED_COUNT    10
+#define QDR_LINK_DELIVERY_COUNT     11
+#define QDR_LINK_ADMIN_STATE        12
+#define QDR_LINK_OPER_STATE         13
 
 const char *qdr_link_columns[] =
     {"name",
@@ -43,6 +44,7 @@ const char *qdr_link_columns[] =
      "linkDir",
      "owningAddr",
      "capacity",
+     "peer",
      "undeliveredCount",
      "unsettledCount",
      "deliveryCount",
@@ -112,6 +114,15 @@ static void qdr_agent_write_link_CT(qdr_query_t *query,  qdr_link_t *link)
             qd_compose_insert_uint(body, link->capacity);
             break;
 
+        case QDR_LINK_PEER:
+            if (link->connected_link) {
+                char id[100];
+                snprintf(id, 100, "link.%ld", link->connected_link->identifier);
+                qd_compose_insert_string(body, id);
+              } else
+                qd_compose_insert_null(body);
+            break;
+
         case QDR_LINK_UNDELIVERED_COUNT:
             qd_compose_insert_ulong(body, DEQ_SIZE(link->undelivered));
             break;

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3bdc04fe/src/router_core/agent_link.h
----------------------------------------------------------------------
diff --git a/src/router_core/agent_link.h b/src/router_core/agent_link.h
index fb2df25..2448aad 100644
--- a/src/router_core/agent_link.h
+++ b/src/router_core/agent_link.h
@@ -24,7 +24,7 @@
 void qdra_link_get_first_CT(qdr_core_t *core, qdr_query_t *query, int offset);
 void qdra_link_get_next_CT(qdr_core_t *core, qdr_query_t *query);
 
-#define QDR_LINK_COLUMN_COUNT  13
+#define QDR_LINK_COLUMN_COUNT  14
 
 const char *qdr_link_columns[QDR_LINK_COLUMN_COUNT + 1];
 

http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/3bdc04fe/tools/qdstat
----------------------------------------------------------------------
diff --git a/tools/qdstat b/tools/qdstat
index 2144b1f..5218645 100755
--- a/tools/qdstat
+++ b/tools/qdstat
@@ -224,6 +224,7 @@ class BusManager(Node):
         heads.append(Header("type"))
         heads.append(Header("dir"))
         heads.append(Header("id"))
+        heads.append(Header("peer"))
         heads.append(Header("addr"))
         heads.append(Header("cap"))
         heads.append(Header("undel"))
@@ -238,7 +239,8 @@ class BusManager(Node):
             row = []
             row.append(link.linkType)
             row.append(link.linkDir)
-            row.append(self._identity_clean(link.identity))
+            row.append(link.identity)
+            row.append(link.peer)
             row.append(self._addr_summary(link.owningAddr))
             row.append(link.capacity)
             row.append(link.undeliveredCount)


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