activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject git commit: AMQ-4760: dstat command to have same set of output as in hawtio.
Date Tue, 01 Oct 2013 20:12:25 GMT
Updated Branches:
  refs/heads/trunk 83f519cd6 -> 8089e0d10


AMQ-4760: dstat command to have same set of output as in hawtio.


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/8089e0d1
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/8089e0d1
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/8089e0d1

Branch: refs/heads/trunk
Commit: 8089e0d10608f48583883f9d343333f84e84535d
Parents: 83f519c
Author: Claus Ibsen <claus.ibsen@gmail.com>
Authored: Tue Oct 1 22:12:17 2013 +0200
Committer: Claus Ibsen <claus.ibsen@gmail.com>
Committed: Tue Oct 1 22:12:17 2013 +0200

----------------------------------------------------------------------
 .../activemq/console/command/DstatCommand.java  | 54 +++++++++++---------
 1 file changed, 30 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/8089e0d1/activemq-console/src/main/java/org/apache/activemq/console/command/DstatCommand.java
----------------------------------------------------------------------
diff --git a/activemq-console/src/main/java/org/apache/activemq/console/command/DstatCommand.java
b/activemq-console/src/main/java/org/apache/activemq/console/command/DstatCommand.java
index a0ccc36..a64e190 100644
--- a/activemq-console/src/main/java/org/apache/activemq/console/command/DstatCommand.java
+++ b/activemq-console/src/main/java/org/apache/activemq/console/command/DstatCommand.java
@@ -16,7 +16,6 @@
  */
 package org.apache.activemq.console.command;
 
-import java.io.IOException;
 import java.util.List;
 import java.util.Locale;
 
@@ -86,10 +85,10 @@ public class DstatCommand extends AbstractJmxCommand {
         String query = JmxMBeansUtil.createQueryString(queryString, "*");
         List<?> queueList = JmxMBeansUtil.queryMBeans(createJmxConnection(), query);
 
-        final String header = "%-60s  %10s  %10s  %10s  %10s";
-        final String tableRow = "%-60s  %10d  %10d  %10d  %10d";
+        final String header = "%-50s  %10s  %10s  %10s  %10s  %10s  %10s";
+        final String tableRow = "%-50s  %10d  %10d  %10d  %10d  %10d  %10d";
 
-        context.print(String.format(Locale.US, header, "Name", "Pending", "Consumers", "Enqueued",
"Dequeued"));
+        context.print(String.format(Locale.US, header, "Name", "Queue Size", "Producer #",
"Consumer #", "Enqueue #", "Dequeue #", "Memory %"));
 
         // Iterate through the queue result
         for (Object view : queueList) {
@@ -98,11 +97,13 @@ public class DstatCommand extends AbstractJmxCommand {
                 newProxyInstance(createJmxConnection(), queueName, QueueViewMBean.class,
true);
 
             context.print(String.format(Locale.US, tableRow,
-                                        queueView.getName(),
-                                        queueView.getQueueSize(),
-                                        queueView.getConsumerCount(),
-                                        queueView.getEnqueueCount(),
-                                        queueView.getDequeueCount()));
+                    queueView.getName(),
+                    queueView.getQueueSize(),
+                    queueView.getProducerCount(),
+                    queueView.getConsumerCount(),
+                    queueView.getEnqueueCount(),
+                    queueView.getDequeueCount(),
+                    queueView.getMemoryPercentUsage()));
         }
     }
 
@@ -111,10 +112,10 @@ public class DstatCommand extends AbstractJmxCommand {
         String query = JmxMBeansUtil.createQueryString(queryString, "Queue");
         List<?> queueList = JmxMBeansUtil.queryMBeans(createJmxConnection(), query);
 
-        final String header = "%-60s  %10s  %10s  %10s  %10s";
-        final String tableRow = "%-60s  %10d  %10d  %10d  %10d";
+        final String header = "%-50s  %10s  %10s  %10s  %10s  %10s  %10s";
+        final String tableRow = "%-50s  %10d  %10d  %10d  %10d  %10d  %10d";
 
-        context.print(String.format(Locale.US, header, "Name", "Pending", "Consumers", "Enqueued",
"Dequeued"));
+        context.print(String.format(Locale.US, header, "Name", "Queue Size", "Producer #",
"Consumer #", "Enqueue #", "Dequeue #", "Memory %"));
 
         // Iterate through the queue result
         for (Object view : queueList) {
@@ -123,11 +124,13 @@ public class DstatCommand extends AbstractJmxCommand {
                 newProxyInstance(createJmxConnection(), queueName, QueueViewMBean.class,
true);
 
             context.print(String.format(Locale.US, tableRow,
-                                        queueView.getName(),
-                                        queueView.getQueueSize(),
-                                        queueView.getConsumerCount(),
-                                        queueView.getEnqueueCount(),
-                                        queueView.getDequeueCount()));
+                    queueView.getName(),
+                    queueView.getQueueSize(),
+                    queueView.getProducerCount(),
+                    queueView.getConsumerCount(),
+                    queueView.getEnqueueCount(),
+                    queueView.getDequeueCount(),
+                    queueView.getMemoryPercentUsage()));
         }
     }
 
@@ -136,10 +139,10 @@ public class DstatCommand extends AbstractJmxCommand {
         String query = JmxMBeansUtil.createQueryString(queryString, "Topic");
         List<?> topicsList = JmxMBeansUtil.queryMBeans(createJmxConnection(), query);
 
-        final String header = "%-60s  %10s  %10s  %10s";
-        final String tableRow = "%-60s  %10d  %10d  %10d";
+        final String header = "%-50s  %10s  %10s  %10s  %10s  %10s  %10s";
+        final String tableRow = "%-50s  %10d  %10d  %10d  %10d  %10d  %10d";
 
-        context.print(String.format(Locale.US, header, "Name", "Consumers", "Enqueued", "Dequeued"));
+        context.print(String.format(Locale.US, header, "Name", "Queue Size", "Producer #",
"Consumer #", "Enqueue #", "Dequeue #", "Memory %"));
 
         // Iterate through the topics result
         for (Object view : topicsList) {
@@ -148,10 +151,13 @@ public class DstatCommand extends AbstractJmxCommand {
                 newProxyInstance(createJmxConnection(), topicName, TopicViewMBean.class,
true);
 
             context.print(String.format(Locale.US, tableRow,
-                                        topicView.getName(),
-                                        topicView.getConsumerCount(),
-                                        topicView.getEnqueueCount(),
-                                        topicView.getDequeueCount()));
+                    topicView.getName(),
+                    topicView.getQueueSize(),
+                    topicView.getProducerCount(),
+                    topicView.getConsumerCount(),
+                    topicView.getEnqueueCount(),
+                    topicView.getDequeueCount(),
+                    topicView.getMemoryPercentUsage()));
         }
     }
 


Mime
View raw message