summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2021-04-06 12:48:13 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2021-04-06 12:48:13 +0200
commitb035d1f8f3bd4cea7a0a7817c21ef161f2bb2fd7 (patch)
tree82473f9a50cf814177004e068ff08911f3156034
parent35a965912f055804ceb2939e7960e175a5da7db1 (diff)
parentc3e63b4dd59f1724a7fa29371e53dfa7f46cbcd3 (diff)
downloadpsutil-b035d1f8f3bd4cea7a0a7817c21ef161f2bb2fd7.tar.gz
Merge branch 'master' of github.com:giampaolo/psutil
-rw-r--r--HISTORY.rst1
-rw-r--r--psutil/_pssunos.py2
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