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

SunOS: process nice() is incorrect #1082

Closed
giampaolo opened this issue May 18, 2017 · 1 comment
Closed

SunOS: process nice() is incorrect #1082

giampaolo opened this issue May 18, 2017 · 1 comment

Comments

@giampaolo
Copy link
Owner

======================================================================
FAIL: psutil.tests.test_posix.TestProcess.test_nice
----------------------------------------------------------------------
Traceback (most recent call last):
  File "psutil/tests/test_posix.py", line 208, in test_nice
    self.assertEqual(ps_nice, psutil_nice)
AssertionError: 20 != 0
@giampaolo
Copy link
Owner Author

So it turns out it's "ps" which is wrong. "ps" retrieves the niceness value from /proc/pid/psinfo which incorrectly returns 20 instead of 0. The real deal is getpriority(2) which correctly returns 0 and psutil relies on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant