diff options
author | Thomas Klausner <wiz@gatalith.at> | 2022-08-27 14:25:06 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-27 16:25:06 +0200 |
commit | d2fab7c8de16b6ffbfb0faa3e832845bc1ef0df0 (patch) | |
tree | ffb68a940eaf83ec4f3a69d279c30c21f400ca92 | |
parent | 4446e3bd5fd29e0598f2ca6672d5ffe8ca40d442 (diff) | |
download | psutil-d2fab7c8de16b6ffbfb0faa3e832845bc1ef0df0.tar.gz |
[NetBSD] get data about cached memory usage from /proc/meminfo as well (#2088)
-rw-r--r-- | psutil/_psbsd.py | 2 |
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) |