Bug 467455 - gnome-system-monitor shows incorrect CPU count
Summary: gnome-system-monitor shows incorrect CPU count
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-system-monitor
Version: 10
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Søren Sandmann Pedersen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F10Target F10DesktopTarget
TreeView+ depends on / blocked
 
Reported: 2008-10-17 15:08 UTC by James Laska
Modified: 2014-06-18 09:10 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-12-03 01:23:18 UTC


Attachments (Terms of Use)
gnome-system-monitor.png (53.06 KB, image/png)
2008-10-17 15:08 UTC, James Laska
no flags Details
/proc/cpuinfo (5.23 KB, text/plain)
2008-10-17 15:14 UTC, James Laska
no flags Details
libgtop fix/workaround (594 bytes, patch)
2008-10-21 10:17 UTC, Yanko Kaneti
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
GNOME Bugzilla 468495 None None None Never

Description James Laska 2008-10-17 15:08:58 UTC
Created attachment 320675 [details]
gnome-system-monitor.png

Description of problem:

gnome-system-monitor lists only 6 CPU's under the System tab.  /proc/cpuinfo shows 8.

Version-Release number of selected component (if applicable):
gnome-system-monitor-2.24.0-3.fc10.i386
kernel-2.6.27.2-23.rc1.fc10.i686


How reproducible:
100%

Steps to Reproduce:
1. Launch gnome-system-monitor
2. Select System tab
  
Actual results:

See screenshot attached

Expected results:

See /proc/cpuinfo attached

Additional info:

Comment 1 James Laska 2008-10-17 15:14:28 UTC
Created attachment 320677 [details]
/proc/cpuinfo

Comment 2 Yanko Kaneti 2008-10-21 10:17:48 UTC
Created attachment 320996 [details]
libgtop fix/workaround

I've tracked this to libtop deficiency reading larger /proc/cpuinfo.
This minimal libgtop patch fixes/workarounds it for me.

Comment 3 Søren Sandmann Pedersen 2008-10-31 17:38:07 UTC
Yanko, while using g_file_get_contents() is better in principle, I don't see why it would help here since the /proc/cpuinfo in question is only ~5K and so fits within the 16K buffer.

(Also the patch needs to free the returned contents).

Comment 4 Yanko Kaneti 2008-10-31 23:24:45 UTC
Soren, I tried to explain it in the upstream bugreport. The way libgtop tries to read the file (single read) comes up short, around 4K, it has to be read again to get the next part and libgtop doesn't do that.  I've been told this is to be expected when reading /proc files, something about kernel page size. 
libgtops file_to_buffer needs to get smarter about this or it should just drop the whole thing and use glib which manages to get the whole file contents in tact.

Comment 5 Fedora Update System 2008-11-10 02:39:37 UTC
libgtop2-2.22.3-2.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/libgtop2-2.22.3-2.fc9

Comment 6 Fedora Update System 2008-11-12 02:57:24 UTC
libgtop2-2.22.3-2.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 libgtop2'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F9/FEDORA-2008-9579

Comment 7 Bug Zapper 2008-11-26 03:57:30 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 8 Fedora Update System 2008-12-03 01:23:16 UTC
libgtop2-2.22.3-2.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2008-12-07 04:14:52 UTC
libgtop2-2.24.0-2.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.


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