diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-12-27 18:20:31 -0800 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-12-27 18:20:31 -0800 |
commit | 977a4fc47969216f2aedb1d10e2b7c972f9322a1 (patch) | |
tree | b91422dcf35eb5602d600ac125f79255a0d539cc /src/main | |
parent | d7c0913ba636bb32d9451b7b40d907d8a84bab93 (diff) | |
download | trackermap-server-977a4fc47969216f2aedb1d10e2b7c972f9322a1.tar.gz trackermap-server-977a4fc47969216f2aedb1d10e2b7c972f9322a1.tar.bz2 trackermap-server-977a4fc47969216f2aedb1d10e2b7c972f9322a1.zip |
Remove server stats
Diffstat (limited to 'src/main')
-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; - } - } } |