dcapwell commented on code in PR #1938:
URL: https://github.com/apache/cassandra/pull/1938#discussion_r1002086651
##########
test/distributed/org/apache/cassandra/distributed/impl/Instance.java:
##########
@@ -1138,4 +1148,30 @@ default void run()
}
}
}
+ private void logSystemInfo()
+ {
+ if (inInstancelogger.isInfoEnabled())
+ {
+ try
+ {
+ inInstancelogger.info("Hostname: {}",
InetAddress.getLocalHost().getHostName() + ":" +
DatabaseDescriptor.getStoragePort() + ":" +
DatabaseDescriptor.getSSLStoragePort());
+ }
+ catch (UnknownHostException e1)
+ {
+ inInstancelogger.info("Could not resolve local host");
+ }
+
+ inInstancelogger.info("JVM vendor/version: {}/{}",
JAVA_VM_NAME.getString(), JAVA_VERSION.getString());
+ inInstancelogger.info("Heap size: {}/{}",
+
FBUtilities.prettyPrintMemory(Runtime.getRuntime().totalMemory()),
+
FBUtilities.prettyPrintMemory(Runtime.getRuntime().maxMemory()));
+
+ for(MemoryPoolMXBean pool:
ManagementFactory.getMemoryPoolMXBeans())
+ inInstancelogger.info("{} {}: {}", pool.getName(),
pool.getType(), pool.getPeakUsage());
+
+ inInstancelogger.info("Classpath: {}",
JAVA_CLASS_PATH.getString());
+
+ inInstancelogger.info("JVM Arguments: {}",
ManagementFactory.getRuntimeMXBean().getInputArguments());
+ }
Review Comment:
rather than mimic we should refactor so we have a function that
CassandraDaemon and Instance both call.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]