From 9797077d6a7780f464878e6709391677deca4d9a Mon Sep 17 00:00:00 2001 From: Robert Davies Date: Sat, 23 May 2009 06:21:11 +0000 Subject: [PATCH] Applied patch for https://issues.apache.org/activemq/browse/AMQ-2113 git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@777805 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/activemq/console/Main.java | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/activemq-console/src/main/java/org/apache/activemq/console/Main.java b/activemq-console/src/main/java/org/apache/activemq/console/Main.java index 7bf409c5c7..989cac1827 100644 --- a/activemq-console/src/main/java/org/apache/activemq/console/Main.java +++ b/activemq-console/src/main/java/org/apache/activemq/console/Main.java @@ -19,6 +19,7 @@ package org.apache.activemq.console; 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 class Main { public void runTaskClass(List 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());