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.
This commit is contained in:
Laurent Clouet
2018-08-29 15:42:04 +02:00
parent db39594ba8
commit e9b7ed61fc

View File

@@ -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]);