RRD Notizen
RRD DB Erzeugen
rrdtool create sensors_temp.rrd --step 300 \ DS:Temp_CPU:GAUGE:900:0:100 \ RRA:AVERAGE:0.5:1:1200 \ RRA:MIN:0.5:12:2400 \ RRA:MAX:0.5:12:2400 \ RRA:AVERAGE:0.5:12:2400 \ DS:Temp_Core0:GAUGE:900:0:100 \ RRA:AVERAGE:0.5:1:1200 \ RRA:MIN:0.5:12:2400 \ RRA:MAX:0.5:12:2400 \ RRA:AVERAGE:0.5:12:2400 \ DS:Temp_Core1:GAUGE:900:0:100 \ RRA:AVERAGE:0.5:1:1200 \ RRA:MIN:0.5:12:2400 \ RRA:MAX:0.5:12:2400 \ RRA:AVERAGE:0.5:12:2400 \ DS:Temp_MB1:GAUGE:900:0:100 \ RRA:AVERAGE:0.5:1:1200 \ RRA:MIN:0.5:12:2400 \ RRA:MAX:0.5:12:2400 \ RRA:AVERAGE:0.5:12:2400 \ DS:Temp_MB2:GAUGE:900:0:100 \ RRA:AVERAGE:0.5:1:1200 \ RRA:MIN:0.5:12:2400 \ RRA:MAX:0.5:12:2400 \ RRA:AVERAGE:0.5:12:2400
RRA: The first stores the temperatures supplied for 100 hours (1'200 * 300 seconds = 100 hours). The second RRA stores the minimum temperature recorded over every hour (12 * 300 seconds = 1 hour), for 100 days (2'400 hours). The third and the fourth RRA's do the same for the maximum and average temperature, respectively.
rrdtool update sensors.rrd N:<value DS 1>:<value DS 2>:<value DS 3>:<value DS 4>
rrdtool graph sensors.png -t "Sensor Chart" -v "Temp./Volt" DEF:cpu=sensors.rrd:Temp_CPU:AVERAGE LINE:cpu#FF0000:CPU DEF:mb=sensors.rrd:Temp_MB:AVERAGE LINE:mb#00FF00:MB DEF:t3=sensors.rrd:Temp_3:AVERAGE LINE:t3#0000FF:T3 DEF:vbat=sensors.rrd:V_BAT:AVERAGE LINE:vbat#888888:VBAT
rrdtool create sensors_fans.rrd --step 300 DS:FAN1:GAUGE:900:0:10000 RRA:AVERAGE:0.5:1:1200 RRA:MIN:0.5:12:2400 RRA:MAX:0.5:12:2400 RRA:AVERAGE:0.5:12:2400 DS:FAN2:GAUGE:900:0:10000 RRA:AVERAGE:0.5:1:1200 RRA:MIN:0.5:12:2400 RRA:MAX:0.5:12:2400 RRA:AVERAGE:0.5:12:2400 DS:FAN3:GAUGE:900:0:10000 RRA:AVERAGE:0.5:1:1200 RRA:MIN:0.5:12:2400 RRA:MAX:0.5:12:2400 RRA:AVERAGE:0.5:12:2400
rrdtool create sensors_load.rrd --step 300 DS:USER0:GAUGE:900:0:100 RRA:AVERAGE:0.5:1:1200 RRA:AVERAGE:0.5:12:2400 \ DS:SYSTEM0:GAUGE:900:0:100 RRA:AVERAGE:0.5:1:1200 RRA:AVERAGE:0.5:12:2400 \ DS:IDLE0:GAUGE:900:0:100 RRA:AVERAGE:0.5:1:1200 RRA:AVERAGE:0.5:12:2400 \ DS:USER1:GAUGE:900:0:100 RRA:AVERAGE:0.5:1:1200 RRA:AVERAGE:0.5:12:2400 \ DS:SYSTEM1:GAUGE:900:0:100 RRA:AVERAGE:0.5:1:1200 RRA:AVERAGE:0.5:12:2400 \ DS:IDLE1:GAUGE:900:0:100 RRA:AVERAGE:0.5:1:1200 RRA:AVERAGE:0.5:12:2400 \ DS:USER2:GAUGE:900:0:100 RRA:AVERAGE:0.5:1:1200 RRA:AVERAGE:0.5:12:2400 \ DS:SYSTEM2:GAUGE:900:0:100 RRA:AVERAGE:0.5:1:1200 RRA:AVERAGE:0.5:12:2400 \ DS:IDLE2:GAUGE:900:0:100 RRA:AVERAGE:0.5:1:1200 RRA:AVERAGE:0.5:12:2400 \ DS:USER3:GAUGE:900:0:100 RRA:AVERAGE:0.5:1:1200 RRA:AVERAGE:0.5:12:2400 \ DS:SYSTEM3:GAUGE:900:0:100 RRA:AVERAGE:0.5:1:1200 RRA:AVERAGE:0.5:12:2400 \ DS:IDLE3:GAUGE:900:0:100 RRA:AVERAGE:0.5:1:1200 RRA:AVERAGE:0.5:12:2400
rrdtool create sensors_freq.rrd --step 300 DS:FREQ0:GAUGE:900:0:4000 RRA:AVERAGE:0.5:1:1200 RRA:AVERAGE:0.5:12:2400 \
DS:FREQ1:GAUGE:900:0:4000 RRA:AVERAGE:0.5:1:1200 RRA:AVERAGE:0.5:12:2400 \
DS:FREQ2:GAUGE:900:0:4000 RRA:AVERAGE:0.5:1:1200 RRA:AVERAGE:0.5:12:2400 \
DS:FREQ3:GAUGE:900:0:4000 RRA:AVERAGE:0.5:1:1200 RRA:AVERAGE:0.5:12:2400
rrdtool create sensors_smart_temp.rrd --step 300 \
DS:sda:GAUGE:900:0:100 RRA:AVERAGE:0.5:1:1200 RRA:AVERAGE:0.5:12:2400 \
DS:sdb:GAUGE:900:0:100 RRA:AVERAGE:0.5:1:1200 RRA:AVERAGE:0.5:12:2400 \
DS:sdc:GAUGE:900:0:100 RRA:AVERAGE:0.5:1:1200 RRA:AVERAGE:0.5:12:2400 \
DS:sdd:GAUGE:900:0:100 RRA:AVERAGE:0.5:1:1200 RRA:AVERAGE:0.5:12:2400
rrdtool create sensors_keller_temp.rrd --step 300 \ DS:temp:GAUGE:900:0:100 RRA:AVERAGE:0.5:1:1200 RRA:AVERAGE:0.5:12:2400
rrdtool create sensors_keller_humid.rrd --step 300 \ DS:humid:GAUGE:900:0:100 RRA:AVERAGE:0.5:1:1200 RRA:AVERAGE:0.5:12:2400