fix memory display on Ubuntu

This commit is contained in:
Martinez 2015-12-26 21:50:10 +01:00
parent a3cd191b99
commit ebc54aa7c1

View file

@ -434,6 +434,8 @@ class StatsPart(Part):
for line in f:
if line.startswith("MemTotal"):
mem_total = int(line.split()[1]) * 1024
elif line.startswith("MemFree"): # MemAvailable is not available on some systems, but folllows MemFree
mem_free = int(line.split()[1]) * 1024
elif line.startswith("MemAvailable"):
mem_free = int(line.split()[1]) * 1024
elif line.startswith("SwapTotal"):