Bug 467455 - gnome-system-monitor shows incorrect CPU count
gnome-system-monitor shows incorrect CPU count
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: gnome-system-monitor (Show other bugs)
10
All Linux
medium Severity medium
: ---
: ---
Assigned To: Søren Sandmann Pedersen
Fedora Extras Quality Assurance
: Patch
Depends On:
Blocks: F10Target F10DesktopTarget
  Show dependency treegraph
 
Reported: 2008-10-17 11:08 EDT by James Laska
Modified: 2014-06-18 05:10 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-12-02 20:23:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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


External Trackers
Tracker ID Priority Status Summary Last Updated
GNOME Desktop 468495 None None None Never

  None (edit)
Description James Laska 2008-10-17 11:08:58 EDT
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 11:14:28 EDT
Created attachment 320677 [details]
/proc/cpuinfo
Comment 2 Yanko Kaneti 2008-10-21 06:17:48 EDT
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 13:38:07 EDT
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 19:24:45 EDT
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-09 21:39:37 EST
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-11 21:57:24 EST
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-25 22:57:30 EST
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-02 20:23:16 EST
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-06 23:14:52 EST
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.