Skip to content

Commit

Permalink
Update system_monitor.py
Browse files Browse the repository at this point in the history
  • Loading branch information
phate999 committed Aug 2, 2023
1 parent eb99715 commit 2a2106c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system_monitor/system_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2a2106c

Please sign in to comment.