dhanush427 commented on code in PR #3420:
URL: https://github.com/apache/cassandra/pull/3420#discussion_r1680034607


##########
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, " ");
+        String PM_totalMemoryBytes = 
FBUtilities.prettyPrintMemory(totalMemoryBytes, " ");
+        String PM_totalswapMemoryBytes = 
FBUtilities.prettyPrintMemory(totalswapMemoryBytes, " ");
+
+        String PM_OSInUseMemoryBytes = 
FBUtilities.prettyPrintMemory(totalswapMemoryBytes - freeMemoryBytes, " ");
+        String PM_SWAPInUseMemoryBytes = 
FBUtilities.prettyPrintMemory(totalswapMemoryBytes - swapMemoryBytes, " ");
+
+        probe.output().out.println("GC Threads: " + thread[1]);

Review Comment:
   refactored away



-- 
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]

Reply via email to