Bug 579409

Summary: The sysstat's programs such as mpstat shows one extra cpu.
Product: Red Hat Enterprise Linux 5 Reporter: kyoneyama <kyoneyam>
Component: sysstatAssignee: Ivana Varekova <varekova>
Status: CLOSED ERRATA QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: low Docs Contact:
Priority: low    
Version: 5.5CC: bnater, jwest, ovasik, tao, vincew
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, the mpstat utility wrongly interpreted data about processors in the system. Consequently, it reported a processor that did not exist. This bug has been fixed and non-existent CPUs are no longer reported by mpstat.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-21 10:42:35 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 609821    
Attachments:
Description Flags
Patch adapted from BZ 442801 for sysstat 7.0.2 none

Comment 1 kyoneyama 2010-04-05 03:10:00 UTC
Description of problem:

The sysstat's programs such as mpstat shows one extra cpu.

According to the result of mpstat, the number of CPU is displayed from 0 to 8.
However, the number of CPU's core is actually 8, and it should be displayed
from 0 to 7. 

> # mpstat -P ALL 1
> 
> 16時49分08秒  CPU   %user   %nice    %sys %iowait    %irq   %soft  %steal   %idle    intr/s
> 16時49分09秒  all    0.00    0.00    0.12    0.12    0.00    0.00    0.00   99.75      6.00
> 16時49分09秒    0    0.00    0.00    0.00    1.00    0.00    0.00    0.00   99.00      0.00
> 16時49分09秒    1    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00      0.00
> 16時49分09秒    2    0.00    0.00    0.00    0.00    0.99    0.00    0.00   99.01      1.00
> 16時49分09秒    3    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00      1.00
> 16時49分09秒    4    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00      0.00
> 16時49分09秒    5    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00      2.00
> 16時49分09秒    6    0.00    0.00    0.00    0.00    0.00    0.00    0.00  100.00      0.00
> 16時49分09秒    7    0.00    0.00    0.99    0.00    0.00    0.00    0.00   99.01      2.00
> 16時49分09秒    8    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00      0.00


Additional info:

In reviewing the source, when sysfs is mounted /sys, mpstat calculates the
number of CPU by counting "cpu*" under /sys/devices/system/cpu/.


The following in customer's environment.

> # find /sys/devices/system/cpu/ -maxdepth 1
> /sys/devices/system/cpu/
> /sys/devices/system/cpu/sched_mc_power_savings
> /sys/devices/system/cpu/cpuidle
> /sys/devices/system/cpu/cpu0
> /sys/devices/system/cpu/cpu1
> /sys/devices/system/cpu/cpu2
> /sys/devices/system/cpu/cpu3
> /sys/devices/system/cpu/cpu4
> /sys/devices/system/cpu/cpu5
> /sys/devices/system/cpu/cpu6
> /sys/devices/system/cpu/cpu7

I assume that "cpuidle" was considered with the 9th CPU by mistake.

The same phenomenon has been reported in the following issue:

 * https://bugzilla.redhat.com/show_bug.cgi?id=442801

Comment 2 Vince Worthington 2010-05-10 19:43:53 UTC
Created attachment 412947 [details]
Patch adapted from BZ 442801 for sysstat 7.0.2

Comment 12 Tomas Capek 2011-06-29 08:29:49 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previously, the mpstat utility wrongly interpreted data about processors in the system. Consequently, it reported a processor that did not exist. This bug has been fixed and non-existent CPUs are no longer reported by mpstat.

Comment 13 errata-xmlrpc 2011-07-21 10:42:35 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2011-1005.html