diff options
author | Jake Omann <jomann@nagios.com> | 2021-02-21 04:25:07 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-21 11:25:07 +0100 |
commit | c3e63b4dd59f1724a7fa29371e53dfa7f46cbcd3 (patch) | |
tree | 6cc3a630c3a514e7de0d932d7cc50fef22579185 | |
parent | dd237b19a4ca286ed7ce9f89b213b2848c9078cf (diff) | |
download | psutil-c3e63b4dd59f1724a7fa29371e53dfa7f46cbcd3.tar.gz |
Fix incorrect range for Solaris swap output (#1874) (#1914)
Signed-off-by: Jake Omann <jomann@nagios.com>
-rw-r--r-- | HISTORY.rst | 1 | ||||
-rw-r--r-- | psutil/_pssunos.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/HISTORY.rst b/HISTORY.rst index 0998908a..b42261ab 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -20,6 +20,7 @@ XXXX-XX-XX - 1892_: [macOS] psutil.cpu_freq() broken on Apple M1. - 1904_: [Windows] OpenProcess fails with ERROR_SUCCESS due to GetLastError() called after sprintf(). (patch by alxchk) +- 1874_: [Solaris] swap output error due to incorrect range. - 1913_: [Linux] wait_procs seemingly ignoring timeout, TimeoutExpired thrown 5.8.0 diff --git a/psutil/_pssunos.py b/psutil/_pssunos.py index 816ebf07..84d78814 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[3:4] + t, f = line[3:5] total += int(int(t) * 512) free += int(int(f) * 512) used = total - free |