3
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
6
PROGPATH=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
7
REVISION=`echo '$Revision: 1.2 $' | sed -e 's/[^0-9.]//g'`
13
echo "Usage: $PROGNAME"
17
print_revision $PROGNAME $REVISION
21
echo "This plugin checks hardware status using the lm_sensors package."
37
print_revision $PROGNAME $REVISION
41
print_revision $PROGNAME $REVISION
45
sensordata=`sensors 2>&1`
47
if test "$1" = "-v" -o "$1" = "--verbose"; then
50
if test ${status} -eq 127; then
51
echo "SENSORS UNKNOWN - command not found (did you install lmsensors?)"
53
elif test ${status} -ne 0 ; then
54
echo "WARNING - sensors returned state $status"
57
if echo ${sensordata} | egrep ALARM > /dev/null; then
58
echo SENSOR CRITICAL - Sensor alarm detected!