[munin] Second attempt to unmangle sources from merge

fenris02 fenris02 at fedoraproject.org
Sat May 19 03:21:08 UTC 2012


commit 30875d5341df9e64141390618dfb32ead5d78014
Author: D. Johnson <fenris02 at fedoraproject.org>
Date:   Fri May 18 22:20:29 2012 -0500

    Second attempt to unmangle sources from merge

 GCTime.java.patch   |   11 +++++++++
 cpuspeed.in.rev1243 |   59 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 70 insertions(+), 0 deletions(-)
---
diff --git a/GCTime.java.patch b/GCTime.java.patch
new file mode 100644
index 0000000..894b66c
--- /dev/null
+++ b/GCTime.java.patch
@@ -0,0 +1,11 @@
+--- plugins/javalib/org/munin/plugin/jmx/GCTime.java	2012-03-14 19:18:05.000000000 +0400
++++ plugins/javalib/org/munin/plugin/jmx/GCTime.java.new	2012-05-04 15:20:52.000000000 +0400
+@@ -17,6 +17,6 @@
+                         "CopyTime.label MinorTime\n" +
+-			"CopyTime.type DERIVE\n" +
++			"CopyTime.type GAUGE\n" +
+ 			"CopyTime.info The approximate accumulated collection elapsed time in milliseconds. This method returns -1 if the collection elapsed time is undefined for this collector.\n" +
+  		        "MarkSweepCompactTime.label MajorTime\n" +
+- 		        "MarkSweepCompactTime.type DERIVE\n" +
++ 		        "MarkSweepCompactTime.type GAUGE\n" +
+                         "MarkSweepCompactTime.info The approximate accumulated collection elapsed time in milliseconds. This method returns -1 if the collection elapsed time is undefined for this collector.The Java virtual machine implementation may use a high resolution timer to measure the elapsed time. This method may return the same value even if the collection count has been incremented if the collection elapsed time is very short. \n"
diff --git a/cpuspeed.in.rev1243 b/cpuspeed.in.rev1243
new file mode 100644
index 0000000..c5b4b3b
--- /dev/null
+++ b/cpuspeed.in.rev1243
@@ -0,0 +1,59 @@
+#!@@GOODSH@@
+#
+# Plugin to monitor CPU speed
+#
+# Usage: Place in /etc/munin/node.d/ (or link it there  using ln -s)
+#
+# Parameters understood:
+#
+# 	config   (required)
+# 	autoconf (optional - used by munin-config)
+#
+# Magic markers - optional - used by installation scripts and
+# munin-config:
+#
+#%# family=auto
+#%# capabilities=autoconf
+
+if [ "$1" = "autoconf" ]; then
+	if [ -r /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq ]; then
+		echo yes
+		exit 0
+	else
+		echo no
+		exit 1
+	fi
+fi
+
+
+if [ "$1" = "config" ]; then
+    cat <<EOF
+graph_title CPU frequency scaling
+graph_args --base 1000 -r --lower-limit 0
+graph_vlabel Hz
+graph_scale yes
+graph_info This graph shows at what speeds the CPUs are running
+graph_category system
+EOF
+
+for c in /sys/devices/system/cpu/cpu*; do
+    N=${c##*/cpu}
+    MAXHZ=$(cat $c/cpufreq/cpuinfo_max_freq)
+    cat <<EOF
+cpu$N.label CPU $N
+cpu$N.max $MAXHZ
+cpu$N.min $(cat $c/cpufreq/cpuinfo_min_freq)
+cpu$N.type GAUGE
+EOF
+    if [ "$scaleto100" = "yes" ]; then
+	echo "cpu$N.cdef $cpu$N,$MAXHZ,/"
+    fi
+done
+
+	exit 0
+fi
+
+for c in /sys/devices/system/cpu/cpu*; do
+    N=${c##*/cpu}
+    echo "cpu$N.value $(cat $c/cpufreq/scaling_cur_freq)"
+done


More information about the scm-commits mailing list