root / plugins / system / ibmfan @ ef960abc
Historique | Voir | Annoter | Télécharger (1,05 ko)
| 1 | 6db66854 | Dominik Stadler | #!/bin/sh |
|---|---|---|---|
| 2 | # |
||
| 3 | # Plugin to monitor fan speed on an IBM/Lenovo Laptop |
||
| 4 | # |
||
| 5 | # This plugin reads the current speed of the system fan from |
||
| 6 | # the /proc file system. As it queries specific files provided |
||
| 7 | # by kernel modules for IBM/Lenovo Laptops, it probably only |
||
| 8 | # works for those, but it should be easy to adapt to others |
||
| 9 | # if similar information is available for other types of laptops. |
||
| 10 | # |
||
| 11 | # By dominik dot stadler at gmx dot at |
||
| 12 | # |
||
| 13 | # Magic markers (optional - only used by munin-config and some |
||
| 14 | # installation scripts): |
||
| 15 | # |
||
| 16 | #%# family=auto |
||
| 17 | #%# capabilities=autoconf |
||
| 18 | |||
| 19 | if [ "$1" = "autoconf" ]; then |
||
| 20 | if [ -r /proc/acpi/ibm/fan ]; then |
||
| 21 | echo yes |
||
| 22 | exit 0 |
||
| 23 | else |
||
| 24 | echo no |
||
| 25 | exit 1 |
||
| 26 | fi |
||
| 27 | fi |
||
| 28 | |||
| 29 | |||
| 30 | if [ "$1" = "config" ]; then |
||
| 31 | echo 'graph_title Fan speed' |
||
| 32 | echo 'graph_args --base 1000 -l 0' |
||
| 33 | echo 'graph_vlabel speed' |
||
| 34 | echo 'graph_scale no' |
||
| 35 | echo 'graph_category system' |
||
| 36 | echo 'graph_info This graph shows the speed of the system fan.' |
||
| 37 | echo 'fan.label speed' |
||
| 38 | echo 'fan.info The current speed of the system fan.' |
||
| 39 | exit 0 |
||
| 40 | fi |
||
| 41 | |||
| 42 | cat /proc/acpi/ibm/fan | grep "speed:" | awk '{print "fan.value " $2}' |
