Skip to content

Commit

Permalink
Fix incorrect range for Solaris swap output (#1874) (#1914)
Browse files Browse the repository at this point in the history
Signed-off-by: Jake Omann <jomann@nagios.com>
  • Loading branch information
jomann09 authored Feb 21, 2021
1 parent dd237b1 commit c3e63b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion psutil/_pssunos.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c3e63b4

Please sign in to comment.