summaryrefslogtreecommitdiffhomepage
path: root/src/Plugins/Monitors/Mem.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Plugins/Monitors/Mem.hs')
-rw-r--r--src/Plugins/Monitors/Mem.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Plugins/Monitors/Mem.hs b/src/Plugins/Monitors/Mem.hs
index 47a4c3f..d7b6754 100644
--- a/src/Plugins/Monitors/Mem.hs
+++ b/src/Plugins/Monitors/Mem.hs
@@ -33,7 +33,7 @@ parseMEM =
info = M.fromList $ map (\line -> (line !! 0, (read $ line !! 1 :: Float) / 1024)) content
[total, free, buffer, cache] = map (info M.!) ["MemTotal:", "MemFree:", "Buffers:", "Cached:"]
rest = free + buffer + cache
- used = total - rest
+ used = total - (M.findWithDefault rest "MemAvailable:" info)
usedratio = used / total
freeratio = free / total
return [usedratio, freeratio, total, free, buffer, cache, rest, used, freeratio]