From 80956e267e15ff9a875d0803f3c7c07abdd3c4f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Thu, 9 Aug 2012 15:59:50 -0700 Subject: [PATCH] Remove sensors that use lm_sensors. These are already supported by sensors_ in main repository. --- plugins/sensors/cpu_tmp_sensors | 53 ------------------------- plugins/sensors/cputemp | 40 ------------------- plugins/sensors/fbdimm_temp | 37 ------------------ plugins/sensors/k8temp | 69 --------------------------------- 4 files changed, 199 deletions(-) delete mode 100755 plugins/sensors/cpu_tmp_sensors delete mode 100755 plugins/sensors/cputemp delete mode 100755 plugins/sensors/fbdimm_temp delete mode 100755 plugins/sensors/k8temp diff --git a/plugins/sensors/cpu_tmp_sensors b/plugins/sensors/cpu_tmp_sensors deleted file mode 100755 index 5dfe7d10..00000000 --- a/plugins/sensors/cpu_tmp_sensors +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -# -# Plugin to monitor the CPU temperature through lm-sensors. -# v1.0 (2008-02-15) Oliver Ladner -# -# Requirements: -# - A configured lm-sensors installation -# - Supported device (see http://www.lm-sensors.org/wiki/Devices) -# - grep, sed and awk -# -# Todo: -# - Ability to monitor multiple sensors like fan speeds, voltage etc. -# - Better checks (availabilty of lm-sensors, sensors itself, path names) -# -# Parameters supported: -# -# config -# autoconf -# -# Magic markers: -#%# capabilities=autoconf - -DETECTED_SENSORS=`sensors -U -A | wc -l` - -case $1 in - config) - cat <<'EOM' -graph_title CPU temperature -graph_vlabel CPU temperature in °C -graph_options light -graph_info This graph shows CPU temperature in °C -temp.label temp -temp.draw LINE1 -graph_category sensors -temp.warning 65 -temp.critical 80 -EOM - exit 0;; -esac - -case $1 in - autoconf) - if [ "$DETECTED_SENSORS" -eq 0 ]; then - echo "no" - exit 1 - else - echo "yes" - exit 0 - fi -esac - -echo -n "temp.value " -sensors | grep 'CPU Temp' | sed 's/[+|°|C]//g' | awk {'print $3'} diff --git a/plugins/sensors/cputemp b/plugins/sensors/cputemp deleted file mode 100755 index 905a0461..00000000 --- a/plugins/sensors/cputemp +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh -# -# Plugin to graph temperatures based on info from /sys/devices/platform/coretemp.* -# -# Parameters: -# -# -# -#%# family=auto -#%# capabilities=autoconf - -if [ "$1" = "autoconf" ]; then - if [ -d /sys/devices/platform/coretemp.0 ]; then - echo yes - exit 0 - else - echo "no (/sys/devices/platform/coretemp.* not there)" - exit 1 - fi -fi - -if [ "$1" = "config" ]; then - echo 'graph_title CPU temperature' - echo 'graph_args --base 1000 -l 0' - echo 'graph_vlabel temp in °C' - echo 'graph_category sensors' - echo 'graph_info This graph shows temperatures based on /sys/devices/platform/coretemp.*/.' - echo cputemp.info CPU temperature. - for c in /sys/devices/platform/coretemp.*; do - core=${c#/sys/devices/platform/coretemp.} - label=`cat $c/temp1_label` - echo core${core}.label $label - done -fi - -for c in /sys/devices/platform/coretemp.*; do - core=${c#/sys/devices/platform/coretemp.} - temp=$((`cat $c/temp1_input` / 1000)) - echo core${core}.value $temp -done diff --git a/plugins/sensors/fbdimm_temp b/plugins/sensors/fbdimm_temp deleted file mode 100755 index 3ae67504..00000000 --- a/plugins/sensors/fbdimm_temp +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# -# Plugin to graph temperatures based on i5k_amb-isa-0000 FB-DIMM sensor -# -# Parameters: -# -# -# -#%# family=auto -#%# capabilities=autoconf - -SENSORS="/usr/bin/sensors" - -if [ "$1" = "autoconf" ]; then - # testing if the i5k FB-DIMM sensors are working. (0->working) - RETVAL=`$SENSORS -A i5k_amb-isa-0000|grep -q DIMM; echo $?` - if [ $RETVAL = 0 ]; then - echo yes - exit 0 - else - echo "no (i5k FB-DIMM sensors not working.)" - exit 1 - fi -fi - -if [ "$1" = "config" ]; then - echo 'graph_title FB-DIMM temperature' - echo 'graph_args --base 1000 -l 0' - echo 'graph_vlabel temp in °C' - echo 'graph_category sensors' - echo 'graph_info This graph shows FB-DIMM temperatures based on reports generated by intel 5000 series chipsets.' - echo fbdimmtemp.info FB-DIMM temperature. - $SENSORS -A i5k_amb-isa-0000|grep DIMM|tr -d ":+"|awk -F "." '{print $2}'|awk '{print "ch"$1"dimm"$3".label Channel "$1" DIMM "$3}' - exit 0 -fi - -$SENSORS -A i5k_amb-isa-0000|grep DIMM|tr -d ":+"|awk -F "." '{print $2}'|awk '{print "ch"$1"dimm"$3".value "$4}' diff --git a/plugins/sensors/k8temp b/plugins/sensors/k8temp deleted file mode 100755 index dabbdb22..00000000 --- a/plugins/sensors/k8temp +++ /dev/null @@ -1,69 +0,0 @@ -#!/bin/sh -# -# k8temp -# -# Plugin to monitor the CPU temperature through lm-sensors -# on multicore AMD cpus -# -# Author: Marc Schiffbauer -# -# Requirements: -# - A configured lm-sensors installation with k8temp kernel module -# - rewuired shell commands: sensors, grep, sed, uniq, cut -# -# Parameters supported: -# -# config -# autoconf -# -# Magic markers: -#%# capabilities=autoconf - -# VERSION 1.0 - -case $1 in - config) - I=1 - LAST_CORE="" - echo "graph_title CPU temperature" - echo "graph_vlabel temperature in °C" - echo "graph_options light" - echo "graph_info This graph shows temperature of all CPU cores in °C" - echo "graph_category sensors" - sensors -uA | grep "^Core" | while read CORE FOO TEMP REST; do - if [ "$LAST_CORE" == "$CORE" ]; then - I=$((I+1)) - else - I=1 - fi - LAST_CORE=$CORE - CORE_NUM=$(echo $CORE | sed 's/Core//') - echo "core${CORE_NUM}_${I}.label Core ${CORE_NUM} sensor $I" - #echo "core${CORE_NUM}_${I}.draw LINE1" - echo "core${CORE_NUM}_${I}.warning 65" - echo "core${CORE_NUM}_${I}.critical 80" - done - exit 0 - ;; - autoconf) - if [ "$(sensors -uA | grep "^Core" | uniq)" ]; then - echo "yes" - exit 0 - else - echo "no" - exit 1 - fi -esac - -sensors -uA | grep "^Core" | while read CORE FOO TEMP REST; do - if [ "$LAST_CORE" == "$CORE" ]; then - I=$((I+1)) - else - I=1 - fi - LAST_CORE=$CORE - CORE_NUM=$(echo $CORE | sed 's/Core//') - TEMP=$(echo $TEMP | cut -d"." -f1) - echo "core${CORE_NUM}_${I}.value $TEMP" -done -