activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r777805 - /activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/Main.java
Date Sat, 23 May 2009 06:21:03 GMT
Author: rajdavies
Date: Sat May 23 06:21:03 2009
New Revision: 777805

URL: http://svn.apache.org/viewvc?rev=777805&view=rev
Log:
Applied patch for https://issues.apache.org/activemq/browse/AMQ-2113

Modified:
    activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/Main.java

Modified: activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/Main.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/Main.java?rev=777805&r1=777804&r2=777805&view=diff
==============================================================================
--- activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/Main.java (original)
+++ activemq/trunk/activemq-console/src/main/java/org/apache/activemq/console/Main.java Sat
May 23 06:21:03 2009
@@ -19,6 +19,7 @@
 import java.io.File;
 import java.io.InputStream;
 import java.io.PrintStream;
+import java.lang.management.ManagementFactory;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.net.JarURLConnection;
@@ -209,6 +210,31 @@
 
     public void runTaskClass(List<String> tokens) throws Throwable {
 
+        StringBuilder buffer = new StringBuilder();
+        buffer.append(System.getProperty("java.vendor"));
+        buffer.append(" ");
+        buffer.append(System.getProperty("java.version"));
+        buffer.append(" ");
+        buffer.append(System.getProperty("java.home"));
+        System.out.println("Java Runtime: " + buffer.toString());
+
+        buffer = new StringBuilder();
+        buffer.append("current="); 
+        buffer.append(Runtime.getRuntime().totalMemory()/1024L); 
+        buffer.append("k  free="); 
+        buffer.append(Runtime.getRuntime().freeMemory()/1024L); 
+        buffer.append("k  max="); 
+        buffer.append(Runtime.getRuntime().maxMemory()/1024L); 
+        buffer.append("k");
+        System.out.println("  Heap sizes: " + buffer.toString());
+
+        List jvmArgs = ManagementFactory.getRuntimeMXBean().getInputArguments();
+        buffer = new StringBuilder(); 
+        for (Object arg : jvmArgs) {
+            buffer.append(" ").append(arg);
+        }
+        System.out.println("    JVM args:" + buffer.toString());
+
         System.out.println("ACTIVEMQ_HOME: " + getActiveMQHome());
         System.out.println("ACTIVEMQ_BASE: " + getActiveMQBase());
 



Mime
View raw message