diff --git a/HISTORY.rst b/HISTORY.rst index dc4afbff9..cc755df81 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. 5.8.0 ===== diff --git a/psutil/_pssunos.py b/psutil/_pssunos.py index 816ebf07f..84d78814f 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