diff --git a/system_monitor/system_monitor.py b/system_monitor/system_monitor.py index d2c8fac0..d7c7f6f5 100644 --- a/system_monitor/system_monitor.py +++ b/system_monitor/system_monitor.py @@ -52,7 +52,7 @@ # Memory Utilization try: mem = cp.get('status/system/memory') - status["memory"] = round((mem["memtotal"] - mem["memfree"]) / mem["memtotal"] * 100) + status["memory"] = round((mem["memtotal"] - mem["memavailable"]) / mem["memtotal"] * 100) if status["memory"] > mem_threshold: cp.alert(f'Memory at {status["memory"]}%') except Exception as e: