mirror of
https://codeberg.org/privacy1st/de-p1st-monitor
synced 2024-11-21 19:33:18 +01:00
fix: raise warning if swap is missing when logging swap usage
This commit is contained in:
parent
8acae50b3b
commit
98e47b9a38
@ -29,8 +29,7 @@ class SwapLogger(Logger):
|
||||
message = f'Swap usage ist at {used_mb} MB of {total_mb} MB'
|
||||
|
||||
if used_mb == 0 and total_mb == 0:
|
||||
# Swap not enabled.
|
||||
return WarnMessage(WarnLevel.NONE)
|
||||
return WarnMessage(WarnLevel.HIGH, 'Swap is not enabled')
|
||||
|
||||
usage = used_mb / total_mb
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user