Bug 579409 - The sysstat's programs such as mpstat shows one extra cpu.
Summary: The sysstat's programs such as mpstat shows one extra cpu.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: sysstat
Version: 5.5
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Ivana Varekova
QA Contact: BaseOS QE - Apps
URL:
Whiteboard:
Depends On:
Blocks: 609821
TreeView+ depends on / blocked
 
Reported: 2010-04-05 02:51 UTC by kyoneyama
Modified: 2018-10-27 14:14 UTC (History)
5 users (show)

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.
Clone Of:
Environment:
Last Closed: 2011-07-21 10:42:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Patch adapted from BZ 442801 for sysstat 7.0.2 (521 bytes, patch)
2010-05-10 19:43 UTC, Vince Worthington
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1005 0 normal SHIPPED_LIVE Low: sysstat security, bug fix, and enhancement update 2011-07-21 10:39:28 UTC

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


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