Browse Source

dagent 发布版本。后续 dagent 单独修改和维护

reghao 4 years ago
parent
commit
a96459fc36
1 changed files with 0 additions and 37 deletions
  1. 0 37
      dagent/src/main/test/Test.java

+ 0 - 37
dagent/src/main/test/Test.java

@@ -1,37 +0,0 @@
-import oshi.SystemInfo;
-import oshi.hardware.HardwareAbstractionLayer;
-import oshi.software.os.OperatingSystem;
-import oshi.hardware.*;
-import oshi.software.os.*;
-
-import java.util.List;
-import java.util.stream.Collectors;
-
-/**
- * @author reghao
- * @date 2021-10-16 17:00:58
- */
-public class Test {
-    public static void main(String[] args) {
-        SystemInfo si = new SystemInfo();
-
-        OperatingSystem os = si.getOperatingSystem();
-        os.getFileSystem().getFileStores().stream()
-                .map(osFileStore -> {
-                    String vol = osFileStore.getVolume();
-                    String mount = osFileStore.getMount();
-                    String fsType = osFileStore.getType();
-
-                    long total = osFileStore.getTotalSpace();
-                    long userAvail = osFileStore.getUsableSpace();
-                    long rootAvail = osFileStore.getFreeSpace();
-
-                    long inodeTotal = osFileStore.getTotalInodes();
-                    long inodeFree = osFileStore.getFreeInodes();
-
-                    return osFileStore;
-                })
-                .collect(Collectors.toList());
-        System.out.println();
-    }
-}