Bug 154584 - [PATCH] ports sysutils/munin-node temperature plugins problem
Summary: [PATCH] ports sysutils/munin-node temperature plugins problem
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: Florian Smeets
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-08 06:40 UTC by HirokiKashiwazaki
Modified: 2011-02-15 00:20 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (440 bytes, patch)
2011-02-08 06:40 UTC, HirokiKashiwazaki
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description HirokiKashiwazaki 2011-02-08 06:40:11 UTC
Plugins files which is installed by ports sysutils/munin-node go wrong.
The files are coretemp and dev_cpu_.
Multiple temperature information are outputed in a line on multicore CPU.
By fixing tr command options, this problem will be get fixed.

Fix: Patches to the /usr/ports/sysutils/munin-node/files will fix this problems.

/usr/ports/sysutils/munin-node/files% diff -u patch-node-node.d.freebsd-coretemp
.diff.org patch-node-node.d.freebsd-coretemp.diff
/usr/ports/sysutils/munin-node/files% diff -u patch-node-node.d.freebsd-dev_cpu_
.diff.org patch-node-node.d.freebsd-dev_cpu_.diff


EOL--nKNn1c7sNYRreDDodIdpfHlbYPXG7lH5cuqv30jjeK7qKsBd
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- patch-node-node.d.freebsd-coretemp.diff.org 2011-02-08 14:22:37.205571766 +0
900
+++ patch-node-node.d.freebsd-coretemp.diff     2011-02-08 13:07:07.976016334 +0
900
@@ -5,7 +5,7 @@
        for cpu in $cpus ; do
                echo -n "CPU$cpu.value "
 -              sysctl -n dev.cpu.$cpu.temperature
-+              sysctl -n dev.cpu.$cpu.temperature | tr -cd '0-9.'
++              sysctl -n dev.cpu.$cpu.temperature | tr -d C
        done
  }
How-To-Repeat: ~% cd /usr/local/share/munin/plugins
/usr/local/share/munin/plugins% sudo -u nobody ./coretemp
CPU0.value 55.0CPU1.value 55.0CPU2.value 54.0CPU3.value 54.0CPU4.value 56.0CPU5.
value 56.0CPU6.value 54.0CPU7.value 54.0CPU8.value 55.0CPU9.value 55.0CPU10.valu
e 54.0CPU11.value 54.0CPU12.value 52.0CPU13.value 53.0CPU14.value 54.0CPU15.valu
e 54.0%
/usr/local/share/munin/plugins% sudo patch -p0 < coretemp.patch
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|--- coretemp   2011-02-08 14:37:15.202635359 +0900
|+++ coretemp.new       2011-02-08 14:37:23.732894373 +0900
--------------------------
Patching file coretemp using Plan A...
Hunk #1 succeeded at 75.
done
/usr/local/share/munin/plugins% cat coretemp.patch
--- coretemp    2011-02-08 14:37:15.202635359 +0900
+++ coretemp.new        2011-02-08 14:37:23.732894373 +0900
@@ -75,7 +75,7 @@
        reqcpus
        for cpu in $cpus ; do
                echo -n "CPU$cpu.value "
-               sysctl -n dev.cpu.$cpu.temperature | tr -cd '0-9.'
+               sysctl -n dev.cpu.$cpu.temperature | tr -d C
        done
 }

/usr/local/share/munin/plugins% sudo -u nobody ./coretemp
CPU0.value 55.0
CPU1.value 55.0
CPU2.value 54.0
CPU3.value 54.0
CPU4.value 56.0
CPU5.value 56.0
CPU6.value 54.0
CPU7.value 54.0
CPU8.value 54.0
CPU9.value 55.0
CPU10.value 54.0
CPU11.value 54.0
CPU12.value 52.0
CPU13.value 52.0
CPU14.value 54.0
CPU15.value 54.0
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2011-02-13 01:54:01 UTC
Responsible Changed
From-To: freebsd-ports-bugs->des

Fix port name and assignment.
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2011-02-13 19:46:42 UTC
Responsible Changed
From-To: des->flo

Over to new maintainer.
Comment 3 dfilter service freebsd_committer 2011-02-15 00:12:02 UTC
flo         2011-02-15 00:11:56 UTC

  FreeBSD ports repository

  Modified files:
    sysutils/munin-node  Makefile pkg-deinstall pkg-install 
    sysutils/munin-node/files 
                              patch-node-node.d.freebsd-coretemp.diff 
                              patch-node-node.d.freebsd-dev_cpu_.diff 
  Added files:
    sysutils/munin-node/files 
                              patch-plugins__node.d__http_loadtime.in 
  Log:
  - fix newsyslog entries, logs have been living in /var/log/munin for some
  time now [1]
  - fix http_loadtime plugin [2]
  - fix coretemp and dev_cpu plugins [3]
  
  PR:             ports/151182 [1], ports/154688 [2], ports/154584 [3]
  Submitted by:   Detlef Peeters <dp@heringa.de> [1]
                  Oliver Brandmueler <ob@e-gitt.net> [2]
                  Hiroki (REO) Kashiwazaki <reo@iic.hokudai.ac.jp> [3]
  
  Revision  Changes    Path
  1.40      +1 -1      ports/sysutils/munin-node/Makefile
  1.2       +3 -3      ports/sysutils/munin-node/files/patch-node-node.d.freebsd-coretemp.diff
  1.2       +3 -3      ports/sysutils/munin-node/files/patch-node-node.d.freebsd-dev_cpu_.diff
  1.1       +11 -0     ports/sysutils/munin-node/files/patch-plugins__node.d__http_loadtime.in (new)
  1.9       +3 -3      ports/sysutils/munin-node/pkg-deinstall
  1.9       +2 -2      ports/sysutils/munin-node/pkg-install
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 Florian Smeets freebsd_committer 2011-02-15 00:16:15 UTC
State Changed
From-To: open->closed

Committed. Thanks!