summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--psutil/_psbsd.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/psutil/_psbsd.py b/psutil/_psbsd.py
index 56acedb3..8672ca6e 100644
--- a/psutil/_psbsd.py
+++ b/psutil/_psbsd.py
@@ -189,6 +189,8 @@ def virtual_memory():
buffers = int(line.split()[1]) * 1024
elif line.startswith(b'MemShared:'):
shared = int(line.split()[1]) * 1024
+ elif line.startswith(b'Cached:'):
+ cached = int(line.split()[1]) * 1024
avail = inactive + cached + free
used = active + wired + cached
percent = usage_percent((total - avail), total, round_=1)