Bug 442801 - mpstat shows one extra cpu
Summary: mpstat shows one extra cpu
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: sysstat
Version: 9
Hardware: x86_64
OS: Linux
low
low
Target Milestone: ---
Assignee: Ivana Varekova
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 459377 (view as bug list)
Depends On:
Blocks: F9Target
TreeView+ depends on / blocked
 
Reported: 2008-04-16 21:20 UTC by Chris Wright
Modified: 2008-08-18 07:36 UTC (History)
2 users (show)

Fixed In Version: 8.0.4-4.fc9
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-17 22:27:47 UTC


Attachments (Terms of Use)
get_sys_cpu_nr account for cpuidle/ dir (548 bytes, patch)
2008-04-16 21:20 UTC, Chris Wright
no flags Details | Diff

Description Chris Wright 2008-04-16 21:20:02 UTC
Description of problem:

mpstat shows one extra cpu

Version-Release number of selected component (if applicable):

sysstat-8.0.4-3.fc9.x86_64

How reproducible:

Very (if /sys is mounted)

Steps to Reproduce:
1. mpstat -P ALL
  
Actual results:

output show one extra cpu (quad core sample output):
Linux 2.6.25-0.204.rc8.git4.fc9.x86_64 (localhost.localdomain)  04/16/2008

02:07:41 PM  CPU   %user   %nice    %sys %iowait    %irq   %soft  %steal   %idle
   intr/s
02:07:41 PM  all    0.36    0.03    0.14    0.03    0.00    0.00    0.00   99.44
     6.23
02:07:41 PM    0    0.07    0.01    0.03    0.01    0.00    0.00    0.00   99.88
     0.44
02:07:41 PM    1    0.97    0.02    0.30    0.02    0.00    0.00    0.00   98.69
     0.60
02:07:41 PM    2    0.20    0.01    0.10    0.03    0.00    0.00    0.00   99.65
     2.02
02:07:41 PM    3    0.20    0.06    0.13    0.05    0.00    0.00    0.00   99.56
     3.17
02:07:41 PM    4    0.00    0.00    0.00    0.00    0.00    0.00    0.00    0.00
     0.00

Note the seemingly unused cpu4.

Expected results:
stats for all plus cpu0-3 on the example quadcore system

Additional info:

This is a result of get_sys_cpu_nr making the assumption that any dir:
/sys/devices/system/cpu/cpu*/ represents a cpu thread.  However there is at
least /sys/devices/system/cpu/cpuidle/ which makes get_sys_cpu_nr return one too
many cpus.  Patch below is tested and works fine here.

Comment 1 Chris Wright 2008-04-16 21:20:02 UTC
Created attachment 302675 [details]
get_sys_cpu_nr account for cpuidle/ dir

Comment 2 Zachary Napora 2008-04-22 04:15:26 UTC
The bug is easily reproducible in current rawhide and a patch has been
provided(works for me, thanks).
Note that this bug has been added to the F9Target tracker.
Changing status to ASSIGNED.

Comment 3 Ivana Varekova 2008-04-23 09:14:27 UTC
Thanks. Fixed in sysstat-8.0.4-4.fc9, sysstat-8.0.4-4.fc10.

Comment 4 Fedora Update System 2008-04-30 07:17:44 UTC
sysstat-8.0.4-4.fc9 has been submitted as an update for Fedora 9

Comment 5 Fedora Update System 2008-05-13 15:24:11 UTC
sysstat-8.0.4-4.fc9 has been pushed to the Fedora 9 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update sysstat'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-3689

Comment 6 Bug Zapper 2008-05-14 09:32:59 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 7 Fedora Update System 2008-05-17 22:27:45 UTC
sysstat-8.0.4-4.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Ivana Varekova 2008-08-18 07:36:36 UTC
*** Bug 459377 has been marked as a duplicate of this bug. ***


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