3 PATH
=/bin
:/sbin
:/usr
/bin
:/usr
/sbin
:/usr
/local
/bin
:/usr
/local
/sbin
6 PROGPATH
=`echo $0 | sed -e 's,[\\/][^\\/][^\\/]*$,,'`
7 REVISION
="@NP_VERSION@"
13 echo "Usage: $PROGNAME" [--ignore-fault]
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 ${status} -eq 127; then
48 text
="SENSORS UNKNOWN - command not found (did you install lmsensors?)"
50 elif test ${status} -ne 0; then
51 text
="WARNING - sensors returned state $status"
53 elif echo ${sensordata} |
egrep ALARM
> /dev
/null
; then
54 text
="SENSOR CRITICAL - Sensor alarm detected!"
56 elif echo ${sensordata} |
egrep FAULT
> /dev
/null \
57 && test "$1" != "-i" -a "$1" != "--ignore-fault"; then
58 text
="SENSOR UNKNOWN - Sensor reported fault"
66 if test "$1" = "-v" -o "$1" = "--verbose"; then