Public bug reported:

The version of psutil in Ubuntu 15.10 / 16.04 is 2.2.1.  The method
cpu_count() in this version of the package has a bug that is fixed in
version 3.2.2.

Illustration of the problem:

$ python3
Python 3.4.3+ (default, Oct 14 2015, 16:03:50) 
[GCC 5.2.1 20151010] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import psutil
>>> psutil.__version__
'2.2.1
>>> psutil.cpu_count(logical=True)
8
>>> psutil.cpu_count(logical=False)
1

The value 1 is wrong. It should be 4.

It works using psutil 3.3.2, installed in a python virtualenv:
$ python3
Python 3.4.3+ (default, Oct 14 2015, 16:03:50) 
[GCC 5.2.1 20151010] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import psutil
>>> psutil.__version__
'3.2.2'
>>> psutil.cpu_count(logical=True)
8
>>> psutil.cpu_count(logical=False)
4
>>> 

I ran this test on Ubuntu 15.10.

** Affects: python-psutil (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to python-psutil in Ubuntu.
https://bugs.launchpad.net/bugs/1518553

Title:
  cpu_count(logical=False) returns wrong value

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-psutil/+bug/1518553/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to