From d67e977cb57e77c6907d3e4c183b8ffedd9e9dcc Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Tue, 13 Mar 2018 18:38:12 +0100 Subject: [PATCH] #1222: [Linux] Process.memory_full_info() was summing both 'swap PSS' (swap proportional set size) and plain 'swap'. Not anymore. --- HISTORY.rst | 2 ++ psutil/_pslinux.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index edf1078ec..9667f85f2 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -14,6 +14,8 @@ XXXX-XX-XX **Bug fixes** - 1216_: fix compatibility with python 2.6 on Windows (patch by Dan Vinakovsky) +- 1222_: [Linux] Process.memory_full_info() was summing both "swap PSS" (swap + proportional set size) and plain "swap". Not anymore. - 1240_: [Windows] cpu_times() float loses accuracy in a long running system. (patch by stswandering) - 1245_: [Linux] sensors_temperatures() may fail with IOError "no such file". diff --git a/psutil/_pslinux.py b/psutil/_pslinux.py index b241710dc..e7f6e2c1e 100644 --- a/psutil/_pslinux.py +++ b/psutil/_pslinux.py @@ -1608,7 +1608,7 @@ def memory_full_info( self, _private_re=re.compile(br"Private.*:\s+(\d+)"), _pss_re=re.compile(br"Pss.*:\s+(\d+)"), - _swap_re=re.compile(br"Swap.*:\s+(\d+)")): + _swap_re=re.compile(br"Swap:\s+(\d+)")): basic_mem = self.memory_info() # Note: using 3 regexes is faster than reading the file # line by line.