Mercurial > repos > other > usr-local-bin
diff sensors-graph @ 12:3adc69ceb249
Add sensor recording and graph generating scripts
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 08 Jul 2017 18:28:27 +0100 |
parents | |
children | 4b6ab7428895 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sensors-graph Sat Jul 08 18:28:27 2017 +0100 @@ -0,0 +1,46 @@ +#! /bin/bash + +start="-6h" + +if [ $# -eq 1 ] +then + start=$1 +fi + +rrdtool graph /tmp/temps.png -w 800 -h 600 -a PNG --start "$start" \ + --vertical-label "temps" \ + --right-axis-label "speeds" \ + --right-axis 100:0 \ + DEF:core1=$HOME/.temps.rrd:core1-temp:AVERAGE \ + DEF:core2=$HOME/.temps.rrd:core2-temp:AVERAGE \ + DEF:core3=$HOME/.temps.rrd:core3-temp:AVERAGE \ + DEF:core4=$HOME/.temps.rrd:core4-temp:AVERAGE \ + DEF:isa1=$HOME/.temps.rrd:isa-temp1:AVERAGE \ + DEF:isa2=$HOME/.temps.rrd:isa-temp2:AVERAGE \ + DEF:isa3=$HOME/.temps.rrd:isa-temp3:AVERAGE \ + DEF:gpu=$HOME/.temps.rrd:gpu:AVERAGE \ + DEF:gpufan_raw=$HOME/.temps.rrd:gpu-fan:AVERAGE \ + DEF:fan1_raw=$HOME/.temps.rrd:fan1:AVERAGE \ + DEF:fan2_raw=$HOME/.temps.rrd:fan2:AVERAGE \ + DEF:fan3_raw=$HOME/.temps.rrd:fan3:AVERAGE \ + DEF:fan4_raw=$HOME/.temps.rrd:fan4:AVERAGE \ + CDEF:fan1=fan1_raw,0.01,* \ + CDEF:fan2=fan2_raw,0.01,* \ + CDEF:fan3=fan3_raw,0.01,* \ + CDEF:fan4=fan4_raw,0.01,* \ + CDEF:gpufan=gpufan_raw,0.25,* \ + LINE1:gpu#009900:"GPU" \ + LINE1:core1#0000bb80:"Core 1" \ + LINE1:core2#0000bb80:"Core 2" \ + LINE1:core3#0000bb80:"Core 3" \ + LINE1:core4#0000bb80:"Core 4" \ + LINE1:isa1#bbbb0080:"ISA 1" \ + LINE1:isa2#bbbb0080:"ISA 2" \ + LINE1:isa3#bbbb0080:"ISA 3" \ + AREA:fan1#99000080:"CPU Fan" \ + AREA:fan2#99000080:"Rear Fan" \ + AREA:gpufan#00990080:"GPU Fan" \ + AREA:fan3#99000080:"Front Fan 1" \ + AREA:fan4#99000080:"Front Fan 2" \ + && eog /tmp/temps.png +rm /tmp/temps.png