-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Linux] psutil module regression bug in psutil.cpu_count(logical=False) #1808
Comments
[11:47 ed.wilts@csi196 ~] > cat /proc/cpuinfo processor : 1 processor : 2 processor : 3 processor : 4 processor : 5 processor : 6 processor : 7 processor : 8 processor : 9 processor : 10 processor : 11 processor : 12 processor : 13 processor : 14 processor : 15 [11:57 ed.wilts@csi196 ~] > lscpu [11:57 ed.wilts@csi196 ~] > uname -a |
======================================================================
|
Platform
psutil.cpu_count(logical=False)
returns in incorrect number of physical cores.
(RHEL7) [11:44 ed.wilts@csi196 sarc] > python3
Python 3.6.5 (default, Sep 16 2019, 14:55:33)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
Compare with phython2 and psutil 5.0.1 on this same system:
[11:46 ed.wilts@csi196 ~] > python2 -c "import psutil; print(psutil.version)"
5.0.1
[11:46 ed.wilts@csi196 ~] > python2
Python 2.7.5 (default, May 20 2019, 12:21:26)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
...
Test results
FAIL: psutil.tests.test_process.TestProcess.test_terminal
Traceback (most recent call last):
File "/opt/starfish/sarc/RHEL7/lib/python3.6/site-packages/psutil/tests/test_process.py", line 305, in test_terminal
self.assertIsNone(terminal)
AssertionError: '/dev/pts/1' is not None
======================================================================
FAIL: psutil.tests.test_linux.TestSystemCPUCountPhysical.test_against_lscpu
Traceback (most recent call last):
File "/opt/starfish/sarc/RHEL7/lib/python3.6/site-packages/psutil/tests/test_linux.py", line 690, in test_against_lscpu
self.assertEqual(psutil.cpu_count(logical=False), len(core_ids))
AssertionError: 15 != 16
======================================================================
FAIL: psutil.tests.test_linux.TestSystemCPUStats.test_ctx_switches
Traceback (most recent call last):
File "/opt/starfish/sarc/RHEL7/lib/python3.6/site-packages/psutil/tests/test_linux.py", line 855, in test_ctx_switches
self.assertAlmostEqual(vmstat_value, psutil_value, delta=500)
AssertionError: 1381056519 != 186064650260 within 500 delta
======================================================================
FAIL: psutil.tests.test_linux.TestSystemCPUStats.test_interrupts
Traceback (most recent call last):
File "/opt/starfish/sarc/RHEL7/lib/python3.6/site-packages/psutil/tests/test_linux.py", line 861, in test_interrupts
self.assertAlmostEqual(vmstat_value, psutil_value, delta=500)
AssertionError: 3985036333 != 89884382270 within 500 delta
======================================================================
FAIL: psutil.tests.test_linux.TestSystemVirtualMemory.test_total
Traceback (most recent call last):
File "/opt/starfish/sarc/RHEL7/lib/python3.6/site-packages/psutil/tests/test_linux.py", line 202, in test_total
self.assertAlmostEqual(vmstat_value, psutil_value)
AssertionError: 404073349120 != 404073353216 within 7 places
FAILED (failures=5, errors=2, skipped=168)
The text was updated successfully, but these errors were encountered: