This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 691743 - s390x /proc/cpuinfo returns wrong number of processors on RHEL6
s390x /proc/cpuinfo returns wrong number of processors on RHEL6
Status: CLOSED CURRENTRELEASE
Product: Candlepin
Classification: Community
Component: candlepin (Show other bugs)
0.5
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Bryan Kearney
John Sefler
: Triaged
Depends On: 680124
Blocks: rhsm-rhel65 rhsm-rhel70
  Show dependency treegraph
 
Reported: 2011-03-29 07:27 EDT by Miroslav Suchý
Modified: 2015-05-14 12:04 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 680124
Environment:
Last Closed: 2013-11-22 18:14:45 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Miroslav Suchý 2011-03-29 07:27:18 EDT
Cloned to subscription manager too.
rhsm use lscpu, which returns number of active processor. Not number of all available.


+++ This bug was initially created as a clone of Bug #680124 +++

Description of problem:
s390x /proc/cpuinfo returns wrong number of processors therefor after registration there is wrong number of processors in Satellite Hardware information.

Version-Release number of selected component (if applicable):
rhn-client-tools-1.0.0-38.el6.noarch

How reproducible:
Always

Steps to Reproduce:
1. Log into s390x machine that has more than 1 processor
2. cat /proc/cpuinfo
3. ls -d  /sys/devices/system/cpu/cpu[0-9] | grep -c cpu[[:digit:]]
4. rhn_register into Satellite and check System > Hardware
  
Actual results:
Numbers differ

Expected results:
Same numbers

Additional info:
RHEL5 /proc/cpuinfo shows proper information.
Explanation for this bug is in bug 621041 comment 18.

--- Additional comment from pm-rhel@redhat.com on 2011-02-24 08:02:44 EST ---

Since this issue was entered in bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

--- Additional comment from mminar@redhat.com on 2011-02-25 02:53:33 EST ---

After discussion with dhorak short clarification.

There is cpuplugd daemon that automaticaly adds/removes cpus based on load and /proc/cpuinfo shows number of cpus defined in that moment. Regarding the fact that this bug is not an issue in RHEL5 - maybe this daemon is not activated by default or it depends on kernel.

Strategy of using /sys/devices/cpu for getting total number of cpus should be the valid on.

--- Additional comment from msuchy@redhat.com on 2011-03-17 05:40:36 EDT ---

Fixed in spacewalk.git in commits:
823888291bdc6f9cd4d843d18bd7ea88241fac89
3ecd060daf6b53baf63122c80c1d52fdbcba6c38

Cherry picked to satellite.git as commits:
ba1b95e5540c39b2aeacfdb4f0a42e6de97e1453
dd8f84ad7fb07be944f5796abaf134806d3d4413

--- Additional comment from errata-xmlrpc@redhat.com on 2011-03-17 05:50:11 EDT ---

Bug report changed to ON_QA status by Errata System.
A QE request has been submitted for advisory RHBA-2011:10475-18
http://errata.devel.redhat.com/errata/show/10475

--- Additional comment from mminar@redhat.com on 2011-03-18 09:32:59 EDT ---

Verified in rhn-client-tools-1.0.0-56.el6 - Hardware tab now shows correct number.
Comment 2 RHEL Product and Program Management 2011-04-03 21:55:26 EDT
Since RHEL 6.1 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.
Comment 6 Adrian Likins 2013-06-27 12:14:11 EDT
Subscription-manager already uses count of /sys/devices/system/cpu/cpuN entries for the cpu count, so I don't think we need to change anything. This should be the number of available cpus at the time? We don't collect online cpu info.

Previously the cpu count info was just informational, it didn't factor into entitlement selection (as opposed to "sockets"). However, new entitlements can be based on cpu "cores", which the total cpu count does factor in. 

I am unsure if entitlement "cores" is for "available" or "online" cpus for s390x cases.

On RHEL6, we also collect info from lscpu as well, but that is also informational, we don't base any entitlement calculations on it.
Comment 7 John Sefler 2013-11-22 18:14:45 EST
Moving to CLOSED.
Determination for the number of processors on a system is done by the subscription-manager component and displayed in its facts list.  Several other bugs that address the processor facts calculations on s390 have already been opened and resolved.  To see what subscription-manager regards as the number of processors on your s390x system run...

[root@ibm-z10-16 ~]# subscription-manager facts --list | egrep "^cpu."
cpu.book(s): 2
cpu.book(s)_per_cpu: 1
cpu.core(s)_per_socket: 1
cpu.cpu(s): 2
cpu.cpu_socket(s): 2
cpu.socket(s)_per_book: 1
cpu.thread(s)_per_core: 1
cpu.topology_source: s390 book_siblings_list

Note You need to log in before you can comment on or make changes to this bug.