forked from pool/python-psutil
Accepting request 984708 from home:WernerFink:branches:devel:languages:python
- Add patch mem-used-bsc1181475.patch (bsc#1181475) * Adopt change of used memory calculation from upstream of procps OBS-URL: https://build.opensuse.org/request/show/984708 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=142
This commit is contained in:
parent
3fe6537bd9
commit
bec43d11bd
32
mem-used-bsc1181475.patch
Normal file
32
mem-used-bsc1181475.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
psutil/_pslinux.py | 12 ++++++------
|
||||||
|
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
--- a/psutil/_pslinux.py
|
||||||
|
+++ b/psutil/_pslinux.py 2022-06-23 09:43:10.973822573 +0000
|
||||||
|
@@ -473,12 +473,6 @@ def virtual_memory():
|
||||||
|
except KeyError:
|
||||||
|
slab = 0
|
||||||
|
|
||||||
|
- used = total - free - cached - buffers
|
||||||
|
- if used < 0:
|
||||||
|
- # May be symptomatic of running within a LCX container where such
|
||||||
|
- # values will be dramatically distorted over those of the host.
|
||||||
|
- used = total - free
|
||||||
|
-
|
||||||
|
# - starting from 4.4.0 we match free's "available" column.
|
||||||
|
# Before 4.4.0 we calculated it as (free + buffers + cached)
|
||||||
|
# which matched htop.
|
||||||
|
@@ -503,6 +497,12 @@ def virtual_memory():
|
||||||
|
if avail > total:
|
||||||
|
avail = free
|
||||||
|
|
||||||
|
+ used = total - avail
|
||||||
|
+ if used < 0:
|
||||||
|
+ # May be symptomatic of running within a LCX container where such
|
||||||
|
+ # values will be dramatically distorted over those of the host.
|
||||||
|
+ used = total - free
|
||||||
|
+
|
||||||
|
percent = usage_percent((total - avail), total, round_=1)
|
||||||
|
|
||||||
|
# Warn about missing metrics which are set to 0.
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jun 23 11:09:31 UTC 2022 - Dr. Werner Fink <werner@suse.de>
|
||||||
|
|
||||||
|
- Add patch mem-used-bsc1181475.patch (bsc#1181475)
|
||||||
|
* Adopt change of used memory calculation from upstream of procps
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue May 24 17:53:52 UTC 2022 - Michael Ströder <michael@stroeder.com>
|
Tue May 24 17:53:52 UTC 2022 - Michael Ströder <michael@stroeder.com>
|
||||||
|
|
||||||
|
@ -36,6 +36,8 @@ Patch1: skip-obs.patch
|
|||||||
Patch2: skip_failing_tests.patch
|
Patch2: skip_failing_tests.patch
|
||||||
# PATCH-FIX-SLE skip_rlimit_tests_on_python2.patch alarrosa@suse.com
|
# PATCH-FIX-SLE skip_rlimit_tests_on_python2.patch alarrosa@suse.com
|
||||||
Patch3: skip_rlimit_tests_on_python2.patch
|
Patch3: skip_rlimit_tests_on_python2.patch
|
||||||
|
# PATCH-FIX-SLE adopt change of used memory of procps
|
||||||
|
Patch4: mem-used-bsc1181475.patch
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user