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/21 17:39:46 UTC
qpid-dispatch git commit: DISPATCH-242 - Added -A option to qdstat to
display autoLinks.
Repository: qpid-dispatch
Updated Branches:
refs/heads/master f51c85241 -> d5a9fe826
DISPATCH-242 - Added -A option to qdstat to display autoLinks.
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/d5a9fe82
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/d5a9fe82
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/d5a9fe82
Branch: refs/heads/master
Commit: d5a9fe82678a85a4e8f46a8e1bdd315378884ab9
Parents: f51c852
Author: Ted Ross <tr...@redhat.com>
Authored: Mon Mar 21 13:36:40 2016 +0000
Committer: Ted Ross <tr...@redhat.com>
Committed: Mon Mar 21 14:17:57 2016 +0000
----------------------------------------------------------------------
tools/qdstat | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/d5a9fe82/tools/qdstat
----------------------------------------------------------------------
diff --git a/tools/qdstat b/tools/qdstat
index 764dd72..e98502d 100755
--- a/tools/qdstat
+++ b/tools/qdstat
@@ -47,6 +47,7 @@ def parse_args(argv):
parser.add_option("-n", "--nodes", help="Show Router Nodes", action="store_const", const="n", dest="show")
parser.add_option("-a", "--address", help="Show Router Addresses", action="store_const", const="a", dest="show")
parser.add_option("-m", "--memory", help="Show Broker Memory Stats", action="store_const", const="m", dest="show")
+ parser.add_option("-A", "--autolink", help="Show Auto Links", action="store_const", const="A", dest="show")
parser.add_option("-v", "--verbose", help="Show maximum detail", action="store_true", dest="verbose")
parser.add_option("--log", help="Show recent log entries", action="store_const", const="log", dest="show")
parser.add_option("--limit", help="Limit number of log entries", type="int")
@@ -314,6 +315,33 @@ class BusManager(Node):
dispRows = sorter.getSorted()
disp.formattedTable(title, heads, dispRows)
+ def displayAutolinks(self):
+ disp = Display(prefix=" ")
+ heads = []
+ heads.append(Header("addr"))
+ heads.append(Header("dir"))
+ heads.append(Header("phase"))
+ heads.append(Header("link"))
+ heads.append(Header("status"))
+ heads.append(Header("lastErr"))
+ rows = []
+
+ objects = self.query('org.apache.qpid.dispatch.router.config.autoLink')
+
+ for al in objects:
+ row = []
+ row.append(al.addr)
+ row.append(al.dir)
+ row.append(al.phase)
+ row.append(al.linkRef)
+ row.append(al.operStatus)
+ row.append(al.lastError)
+ rows.append(row)
+ title = "AutoLinks"
+ sorter = Sorter(heads, rows, 'addr', 0, True)
+ dispRows = sorter.getSorted()
+ disp.formattedTable(title, heads, dispRows)
+
def displayMemory(self):
disp = Display(prefix=" ")
heads = []
@@ -361,6 +389,7 @@ class BusManager(Node):
elif main == 'm': self.displayMemory()
elif main == 'g': self.displayGeneral()
elif main == 'c': self.displayConnections()
+ elif main == 'A': self.displayAutolinks()
elif main == 'log': self.displayLog()
def display(self, identitys):
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org