diff options
author | Jake Omann <jomann@nagios.com> | 2020-11-13 14:52:30 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-13 21:52:30 +0100 |
commit | fd69f22ee5ca38ceff32ae3fac15420c5d8fce29 (patch) | |
tree | 72ca5fb2e29ee2a04ff7a16a8e060f5528588b6d | |
parent | 7050e73c48b38caf2f19409167ba8dfaa9ab9fd4 (diff) | |
download | psutil-fd69f22ee5ca38ceff32ae3fac15420c5d8fce29.tar.gz |
Fix solaris swap output when 'encrypted' column exists (#1876)
-rw-r--r-- | CREDITS | 3 | ||||
-rw-r--r-- | HISTORY.rst | 1 | ||||
-rw-r--r-- | psutil/_pssunos.py | 2 |
3 files changed, 4 insertions, 2 deletions
@@ -467,7 +467,8 @@ N: Farhan Khan I: 823 N: Jake Omann -I: 816, 775 +W: https://github.com/jomann09 +I: 816, 775, 1874 N: Jeremy Humble W: https://github.com/jhumble diff --git a/HISTORY.rst b/HISTORY.rst index 8512793b..bcbffa69 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -15,6 +15,7 @@ XXXX-XX-XX - 1866_: [Windows] process exe(), cmdline(), environ() may raise "invalid access to memory location" on Python 3.9. +- 1874_: [Solaris] wrong swap output given when encrypted column is present 5.7.3 ===== diff --git a/psutil/_pssunos.py b/psutil/_pssunos.py index c64ea9ca..2af15dfa 100644 --- a/psutil/_pssunos.py +++ b/psutil/_pssunos.py @@ -155,7 +155,7 @@ def swap_memory(): total = free = 0 for line in lines: line = line.split() - t, f = line[-2:] + t, f = line[3:4] total += int(int(t) * 512) free += int(int(f) * 512) used = total - free |