diff options
Diffstat (limited to 'src/main/java/org/traccar/model/Server.java')
-rw-r--r-- | src/main/java/org/traccar/model/Server.java | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/src/main/java/org/traccar/model/Server.java b/src/main/java/org/traccar/model/Server.java index 80062cbb0..e84943efc 100644 --- a/src/main/java/org/traccar/model/Server.java +++ b/src/main/java/org/traccar/model/Server.java @@ -18,9 +18,6 @@ package org.traccar.model; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import org.traccar.database.QueryIgnore; -import java.io.File; -import java.lang.management.ManagementFactory; - @JsonIgnoreProperties(ignoreUnknown = true) public class Server extends ExtendedModel { @@ -179,26 +176,4 @@ public class Server extends ExtendedModel { return getClass().getPackage().getImplementationVersion(); } - @QueryIgnore - public double getCpuUsage() { - return ManagementFactory.getOperatingSystemMXBean().getSystemLoadAverage(); - } - - @QueryIgnore - public double getDiskUsage() { - double total = 0; - double free = 0; - File[] drives = File.listRoots(); - if (drives != null && drives.length > 0) { - for (File drive : drives) { - total += drive.getTotalSpace(); - free += drive.getFreeSpace(); - } - } - if (total > 0) { - return 1 - free / total; - } else { - return 0; - } - } } |