2009-01-03 00:19:02 +01:00
|
|
|
#!/bin/sh
|
2018-08-02 02:03:42 +02:00
|
|
|
#
|
2009-01-03 00:19:02 +01:00
|
|
|
# Plugin to monitor fan speed on an IBM/Lenovo Laptop
|
|
|
|
#
|
|
|
|
# This plugin reads the current speed of the system fan from
|
|
|
|
# the /proc file system. As it queries specific files provided
|
2018-08-02 02:03:42 +02:00
|
|
|
# by kernel modules for IBM/Lenovo Laptops, it probably only
|
2009-01-03 00:19:02 +01:00
|
|
|
# works for those, but it should be easy to adapt to others
|
|
|
|
# if similar information is available for other types of laptops.
|
|
|
|
#
|
|
|
|
# By dominik dot stadler at gmx dot at
|
|
|
|
#
|
|
|
|
# Magic markers (optional - only used by munin-config and some
|
|
|
|
# installation scripts):
|
|
|
|
#
|
|
|
|
#%# family=auto
|
|
|
|
#%# capabilities=autoconf
|
|
|
|
|
|
|
|
if [ "$1" = "autoconf" ]; then
|
|
|
|
if [ -r /proc/acpi/ibm/fan ]; then
|
|
|
|
echo yes
|
|
|
|
exit 0
|
|
|
|
else
|
|
|
|
echo no
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2018-08-02 02:03:42 +02:00
|
|
|
|
2009-01-03 00:19:02 +01:00
|
|
|
if [ "$1" = "config" ]; then
|
|
|
|
echo 'graph_title Fan speed'
|
|
|
|
echo 'graph_args --base 1000 -l 0'
|
|
|
|
echo 'graph_vlabel speed'
|
|
|
|
echo 'graph_scale no'
|
2017-02-24 16:13:05 +01:00
|
|
|
echo 'graph_category sensors'
|
2009-01-03 00:19:02 +01:00
|
|
|
echo 'graph_info This graph shows the speed of the system fan.'
|
|
|
|
echo 'fan.label speed'
|
|
|
|
echo 'fan.info The current speed of the system fan.'
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
cat /proc/acpi/ibm/fan | grep "speed:" | awk '{print "fan.value " $2}'
|