[jboss-cvs] JBossAS SVN: r84382 - trunk/system/src/main/org/jboss/system/server.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Feb 18 07:47:47 EST 2009
Author: galder.zamarreno at jboss.com
Date: 2009-02-18 07:47:47 -0500 (Wed, 18 Feb 2009)
New Revision: 84382
Modified:
trunk/system/src/main/org/jboss/system/server/ServerInfo.java
Log:
[JBAS-5240] Log VM arguments in boot.log/server.log startup.
Modified: trunk/system/src/main/org/jboss/system/server/ServerInfo.java
===================================================================
--- trunk/system/src/main/org/jboss/system/server/ServerInfo.java 2009-02-18 12:13:14 UTC (rev 84381)
+++ trunk/system/src/main/org/jboss/system/server/ServerInfo.java 2009-02-18 12:47:47 UTC (rev 84382)
@@ -25,6 +25,7 @@
import java.lang.management.MemoryPoolMXBean;
import java.lang.management.MemoryType;
import java.lang.management.MemoryUsage;
+import java.lang.management.RuntimeMXBean;
import java.lang.management.ThreadInfo;
import java.lang.management.ThreadMXBean;
import java.lang.reflect.Method;
@@ -142,6 +143,8 @@
System.getProperty("os.version") + "," +
System.getProperty("os.arch"));
+ log.info("VM arguments: " + getVMArguments());
+
// Dump out the entire system properties
log.debug("Full System Properties Dump");
Enumeration names = System.getProperties().propertyNames();
@@ -848,6 +851,18 @@
}
}
+ private String getVMArguments()
+ {
+ String args = "";
+ RuntimeMXBean rmBean = ManagementFactory.getRuntimeMXBean();
+ List<String> inputArguments = rmBean.getInputArguments();
+ for (String arg : inputArguments)
+ {
+ args += arg + " ";
+ }
+ return args;
+ }
+
/**
* Display the java.lang.Package info for the pkgName
*/
More information about the jboss-cvs-commits
mailing list