You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/05/24 11:25:12 UTC

[GitHub] [dolphinscheduler] caishunfeng commented on a diff in pull request #10186: [Feature][Monitoring] Added disk available capacity monitoring

caishunfeng commented on code in PR #10186:
URL: https://github.com/apache/dolphinscheduler/pull/10186#discussion_r880382033


##########
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/OSUtils.java:
##########
@@ -92,6 +93,24 @@ public static double memoryUsage() {
         return Double.parseDouble(df.format(memoryUsage));
     }
 
+    /**
+     * get disk usage
+     * Keep 2 decimal
+     *
+     * @return disk free space  (GB)
+     */
+    public static double diskAvailable() {
+        File file = new File(".");
+        long totalSpace = file.getTotalSpace(); //total disk space in bytes.

Review Comment:
   It seems not used.



-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org