Temperaturen auslesen:
Datenbank:
- /usr/local/bin/rrdtool create temperature.rrd\
- DS:cpu_temp:GAUGE:600:0:U\
- DS:hdd_temp:GAUGE:600:0:U\
- RRA:AVERAGE:0.5:1:2016\
- RRA:AVERAGE:0.5:6:1824\
- RRA:AVERAGE:0.5:12:1656\
- RRA:AVERAGE:0.5:24:1176\
- RRA:AVERAGE:0.5:288:830\
- RRA:MIN:0.5:1:2016\
- RRA:MIN:0.5:6:1824\
- RRA:MIN:0.5:12:1656\
- RRA:MIN:0.5:24:1176\
- RRA:MIN:0.5:288:830\
- RRA:MAX:0.5:1:2016\
- RRA:MAX:0.5:6:1824\
- RRA:MAX:0.5:12:1656\
- RRA:MAX:0.5:24:1176\
- RRA:MAX:0.5:288:830
Werte:
- #!/bin/sh
- cpu_temp=”hw.acpi.thermal.tz0.temperature”
- disk=”/dev/ad1″
- smartctl=”/usr/local/sbin/smartctl”
- smartarg=”-A”
- option=”194″ # smart option for temp
- cmd=”/sbin/sysctl”
- rrdtool=”/usr/local/bin/rrdtool”
- rdfile=”/var/db/rrd/temperature.rrd”
- h=`$smartctl $smartarg $disk | grep $option | awk ‘{print $10}’`
- t=`$cmd $cpu_temp | awk ‘{print $2}’ | sed -e s/C//`
- # RRD Datenbank aktualisieren
- rrdtool update $rrdfile N:$t:$h

