From e9b7ed61fc59b96661eee214ba74fc4fb1411ea8 Mon Sep 17 00:00:00 2001 From: Laurent Clouet Date: Wed, 29 Aug 2018 15:42:04 +0200 Subject: [PATCH] Use the right attribut for available memory. MemFree: The amount of physical RAM, in kilobytes, left unused by the system. MemAvailable: An estimate of how much memory is available for starting new applications, without swapping. --- src/com/sheepit/client/os/Linux.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/sheepit/client/os/Linux.java b/src/com/sheepit/client/os/Linux.java index 8f8e357..e9f8a5a 100644 --- a/src/com/sheepit/client/os/Linux.java +++ b/src/com/sheepit/client/os/Linux.java @@ -125,7 +125,7 @@ public class Linux extends OS { while (scanner.hasNextLine()) { String line = scanner.nextLine(); - if (line.startsWith("MemFree")) { + if (line.startsWith("MemAvailable")) { String buf[] = line.split(":"); if (buf.length > 0) { Integer buf2 = new Integer(buf[1].trim().split(" ")[0]);