smiklosovic commented on code in PR #3420:
URL: https://github.com/apache/cassandra/pull/3420#discussion_r1679448105
##########
src/java/org/apache/cassandra/tools/nodetool/GcStats.java:
##########
@@ -31,7 +39,69 @@ public void execute(NodeProbe probe)
double[] stats = probe.getAndResetGCStats();
double mean = stats[2] / stats[5];
double stdev = Math.sqrt((stats[3] / stats[5]) - (mean * mean));
+ long[] thread = probe.numberOfGCThreads();
+
+ //value of jnaLockable
+ boolean jnaLockable = NativeLibrary.jnaMemoryLockable();
+
+ OperatingSystemMXBean osBean = (OperatingSystemMXBean)
ManagementFactory.getOperatingSystemMXBean();
+
+ long freeMemoryBytes = osBean.getFreeMemorySize();
+ long swapMemoryBytes = osBean.getFreeSwapSpaceSize();
+ long totalMemoryBytes = osBean.getTotalMemorySize();
+ long totalswapMemoryBytes = osBean.getTotalSwapSpaceSize();
+
+ String PM_freeMemoryBytes =
FBUtilities.prettyPrintMemory(freeMemoryBytes, " ");
Review Comment:
I prefer to use `freeMemoryBytes` without PM_` prefix here (same for all
similar variables) and use e.g. `osBean.getFreeMemorySize()` call directly as
the argument of `prettyPrintMemory` method.
--
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]