Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Solaris] Swap output wrong on some OS versions #1874

Closed
jomann09 opened this issue Nov 11, 2020 · 2 comments · Fixed by #1876
Closed

[Solaris] Swap output wrong on some OS versions #1874

jomann09 opened this issue Nov 11, 2020 · 2 comments · Fixed by #1876

Comments

@jomann09
Copy link
Contributor

jomann09 commented Nov 11, 2020

Platform

  • Solaris 11.4
  • psutil 5.7.3
  • Any version

Bug description
It looks like on Solaris 11.4 the output of the swap command can have an "encrypted" column.

$ /usr/sbin/swap -l
swapfile                 dev            swaplo      blocks        free encrypted
/dev/zvol/dsk/rpool/swap 303,5               0     8388608     7072944      yes

which is likely causing an issue with this line here: https://github.com/giampaolo/psutil/blob/master/psutil/_pssunos.py#L158 and may be able to be remedied by using line[3:4] instead of line[-2:]

@jomann09 jomann09 added the bug label Nov 11, 2020
@giampaolo
Copy link
Owner

Please make a PR.

@jomann09
Copy link
Contributor Author

Alright added a PR for it.

jomann09 added a commit to jomann09/psutil that referenced this issue Feb 4, 2021
jomann09 added a commit to jomann09/psutil that referenced this issue Feb 4, 2021
Signed-off-by: Jake Omann <jomann@nagios.com>
giampaolo pushed a commit that referenced this issue Feb 21, 2021
Signed-off-by: Jake Omann <jomann@nagios.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants