summaryrefslogtreecommitdiff
path: root/sysutils/munin-node/files/patch-cpu.in
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/munin-node/files/patch-cpu.in')
-rw-r--r--sysutils/munin-node/files/patch-cpu.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/sysutils/munin-node/files/patch-cpu.in b/sysutils/munin-node/files/patch-cpu.in
new file mode 100644
index 000000000000..4dbe91a6bf79
--- /dev/null
+++ b/sysutils/munin-node/files/patch-cpu.in
@@ -0,0 +1,15 @@
+--- munin-1.0.4.orig/node/node.d.freebsd/cpu.in Sun May 9 21:18:35 2004
++++ munin-1.0.4/node/node.d.freebsd/cpu.in Sat Nov 20 15:32:50 2004
+@@ -59,10 +59,10 @@
+ OSV=`/sbin/sysctl -n kern.osrelease | cut -f1 -d.`
+ if [ "$OSV" = "4" ]; then
+ STATUNITS=`/sbin/sysctl -n kern.clockrate | cut -f16 -d' '`
+- elif [ "$OSV" = "5" ]; then
++ elif [ "$OSV" -ge "5" ]; then
+ STATUNITS=`/sbin/sysctl -n kern.clockrate | cut -f13 -d' '`
+ fi
+-# PERCENT=`/sbin/sysctl -n hw.ncpu | awk '{print ($1)*100}'`
++ PERCENT=`/sbin/sysctl -n hw.ncpu | awk '{print ($1)*100}'`
+ SCALE=`echo 'scale=5;' $PERCENT/$STATUNITS | bc -q `
+ NCPU=`/sbin/sysctl -n hw.ncpu`
+ if [ "$scaleto100" = yes ]; then