Bug 163430 - sysutils/xfce4-cpugraph-plugin : fix multiple CPU support
Summary: sysutils/xfce4-cpugraph-plugin : fix multiple CPU support
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-xfce (Nobody)
Depends on:
Reported: 2011-12-18 13:20 UTC by Rene Ladan
Modified: 2011-12-18 20:30 UTC (History)
0 users

See Also:

file.txt (2.49 KB, text/plain)
2011-12-18 13:20 UTC, Rene Ladan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rene Ladan freebsd_committer 2011-12-18 13:20:09 UTC
This patch fixes support for multiple CPUs/cores (as determined by `sysctl hw.ncpu') on FreeBSD:
- modify detect_cpu_number() to return the output of `sysctl hw.ncpu' (via
  sysctl(3)) instead of the constant 1
- modify read_cpu_data() to return the data of CPU/core i in data[i] and the average in data[0].load . Note that data[0].previous_used and data[0].previous_total are not longer written, which is also the case for the NetBSD/OpenBSD case.

Fix: Patch attached with submission follows:
Comment 1 Edwin Groothuis freebsd_committer 2011-12-18 13:20:19 UTC
Responsible Changed
From-To: freebsd-ports-bugs->xfce

xfce@ wants this port PRs (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer 2011-12-18 13:20:22 UTC
Maintainer of sysutils/xfce4-cpugraph-plugin,

Please note that PR ports/163430 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:

Edwin Groothuis via the GNATS Auto Assign Tool
Comment 3 Edwin Groothuis freebsd_committer 2011-12-18 13:20:24 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 Rene Ladan freebsd_committer 2011-12-18 14:21:41 UTC
For some reason, on my dualcore system, the individual bars for core 0
and core 1 are in the reversed order, which can be seen by doing:

# cpuset -c -l N /bin/sh
subshell# while :; do :; done

which puts core N on 100% load. The output of top(1), `sysctl
kern.cp_times', and /compat/linux/proc/stat show the correct values, but
the plugin show bar 2-N going to 100%.

I see the same bug when hacking in __FreeBSD_kernel__ and changing
PROC_STAT to "/compat/linux/proc/stat" in os.c.

I can test this tomorrow on a hexacore box to possibly find more clues.

Patch attached to upstream bug 6531:
Comment 5 Olivier Duchateau 2011-12-18 20:10:45 UTC
It's ok for me, but this port should be maintained by Xfce@.

2011/12/18  <edwin@freebsd.org>:
> Synopsis: sysutils/xfce4-cpugraph-plugin : fix multiple CPU support
> State-Changed-From-To: open->feedback
> State-Changed-By: edwin
> State-Changed-When: Sun Dec 18 13:20:24 UTC 2011
> State-Changed-Why:
> Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
> http://www.freebsd.org/cgi/query-pr.cgi?pr=163430
> _______________________________________________
> freebsd-xfce@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-xfce
> To unsubscribe, send any mail to "freebsd-xfce-unsubscribe@freebsd.org"

Comment 6 dfilter service freebsd_committer 2011-12-18 20:29:28 UTC
rene        2011-12-18 20:29:15 UTC

  FreeBSD ports repository

  Modified files:
    sysutils/xfce4-cpugraph-plugin Makefile 
  Added files:
    sysutils/xfce4-cpugraph-plugin/files patch-panel-plugin__os.c 
  - Add support for multiple cores [1]
  - Move over to xfce@ [2]
  PR:             ports/163430 [1]
  Submitted by:   myself [1]
  Approved by:    Olivier Duchateau [1] [2]
  Revision  Changes    Path
  1.42      +2 -2      ports/sysutils/xfce4-cpugraph-plugin/Makefile
  1.1       +57 -0     ports/sysutils/xfce4-cpugraph-plugin/files/patch-panel-plugin__os.c (new)
cvs-all@freebsd.org mailing list
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 7 Rene Ladan freebsd_committer 2011-12-18 20:29:38 UTC
State Changed
From-To: feedback->closed

Committed, thanks