Révision ea6afd78
remove plugin existing in main munin repository
| plugins/sensors/coretemp | ||
|---|---|---|
| 1 |
#!/bin/sh |
|
| 2 |
# |
|
| 3 |
# Plugin to monitor cpu temperatures through FreeBSD's CORETEMP(4). |
|
| 4 |
# |
|
| 5 |
# $Log$ |
|
| 6 |
# |
|
| 7 |
#%# family=contrib |
|
| 8 |
|
|
| 9 |
SYSCTL=/sbin/sysctl |
|
| 10 |
|
|
| 11 |
if [ "$1" = "autoconf" ]; then |
|
| 12 |
${SYSCTL} dev.cpu.0.temperature 2>&1 >/dev/null
|
|
| 13 |
if [ "$?" -eq "0" ]; then |
|
| 14 |
echo yes |
|
| 15 |
exit 0 |
|
| 16 |
else |
|
| 17 |
echo no |
|
| 18 |
exit 1 |
|
| 19 |
fi |
|
| 20 |
fi |
|
| 21 |
|
|
| 22 |
if [ "$1" = "config" ]; then |
|
| 23 |
|
|
| 24 |
echo 'graph_title CPU temperature' |
|
| 25 |
echo 'graph_args --base 1000 -l 0' |
|
| 26 |
echo 'graph_vlabel temp in ?C' |
|
| 27 |
echo 'graph_category sensors' |
|
| 28 |
${SYSCTL} dev.cpu | grep temperature | awk -F'.' '{ print "CPU"$3"TEMP.label CPUTEMP"$3}'
|
|
| 29 |
exit 0 |
|
| 30 |
fi |
|
| 31 |
|
|
| 32 |
${SYSCTL} dev.cpu | grep temperature | sed 's/^dev\.cpu\.\([[:digit:]]\)\.temperature: \([[:digit:]]\)/CPU\1TEMP.value \2/'
|
|
Formats disponibles : Unified diff