diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2019-04-02 20:37:02 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2019-04-02 20:37:02 +0200 |
commit | b23fb2910c851ae5497ff865a103af595e18e3f2 (patch) | |
tree | b34dd1b984b3b1da4cd135cea835e435216f7a75 | |
parent | d9e69ccfc38702630d5f514daf7ba53fca543469 (diff) | |
download | psutil-b23fb2910c851ae5497ff865a103af595e18e3f2.tar.gz |
#1404: fix regression not returning CPUs > 9
-rw-r--r-- | psutil/_pslinux.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/psutil/_pslinux.py b/psutil/_pslinux.py index fac9e781..ecba4139 100644 --- a/psutil/_pslinux.py +++ b/psutil/_pslinux.py @@ -629,7 +629,8 @@ def cpu_count_physical(): """Return the number of physical cores in the system.""" # Method #1 core_ids = set() - for path in glob.glob("/sys/devices/system/cpu/cpu[0-9]/topology/core_id"): + for path in glob.glob( + "/sys/devices/system/cpu/cpu[0-9]*/topology/core_id"): with open_binary(path) as f: core_ids.add(int(f.read())) result = len(core_ids) |