More fixes

develop
Sven Slootweg 11 years ago
parent 0dde712144
commit b67fdc8ca3

@ -109,7 +109,13 @@ while True:
lines = subprocess.check_output(["free", "-b"]).splitlines()
_, ram_total, ram_used, ram_free, _, ram_buffers, ram_cached = lines[1].split()
_, _, _, ram_available = lines[2].split()
ram_percent = 1.0 * (ram_total - ram_available) / total * 100
ram_total = int(ram_total)
ram_free = int(ram_free)
ram_buffers = int(ram_buffers)
ram_cached = int(ram_cached)
ram_available = int(ram_available)
ram_used = int(ram_used)
ram_percent = 1.0 * (ram_total - ram_available) / ram_total * 100
ram_data = FakeRam(ram_total, ram_used, ram_available, ram_percent, ram_buffers, ram_cached)
else:
ram_data = psutil.virtual_memory()

Loading…
Cancel
Save