#!/bin/bash # # Munin-plugin to monitor the CPU temperature using mbmon # # Used the plugin-frame from "cpuload" by Bjørn Ruberg, published under the GNU GPL # # Plugin monitors the cpu-frequency for both cores of my AMD 64-X2-3600+. Works fine running Debian # GNU/Linux 4.0 (Etch). I do not know any perl and will not proceed in developing this plugin any further. # If you wish to, feel free to do so yourself. If I am able to, I will help with any problems, contact me # via Mail (x-stars gmx.de) or through the Debian-German-User-Mailing-List. # # Frank-Michael Schulze, 21-09-2007 # Licensed under: GNU GPL if [ "$1" = "config" ]; then echo "graph_title CPU speed" echo 'graph_category system' echo "graph_info This graph shows the cpu-speed for each core, as reported by the kernel" echo 'core0.label Core 0 speed in MHz' echo 'core1.label Core 1 speed in MHz' echo "core0.info Core 0 speed in MHz" echo "core1.info Core 1 speed in MHz" echo "core0.type GAUGE" echo "core1.type GAUGE" exit 0 fi echo -n "core0.value " cat /proc/cpuinfo | grep MHz | head -n 1 | cut -c 12- | awk '{ sum += $1 } END { print sum }' echo -n "core1.value " cat /proc/cpuinfo | grep MHz | tail -n 1 | cut -c 12- | awk '{ sum += $1 } END { print sum }'