annotate sensors-graph @ 20:31a626c71eab

Change load type colours to be easier to read
author IBBoard <dev@ibboard.co.uk>
date Mon, 01 Oct 2018 21:09:49 +0100
parents 4b6ab7428895
children 6e30e90527d6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 #! /bin/bash
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3 start="-6h"
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5 if [ $# -eq 1 ]
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 then
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7 start=$1
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
8 fi
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
10 rrdtool graph /tmp/temps.png -w 800 -h 600 -a PNG --start "$start" \
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
11 --vertical-label "temps" \
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
12 --right-axis-label "speeds" \
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
13 --right-axis 100:0 \
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
14 DEF:core1=$HOME/.temps.rrd:core1-temp:AVERAGE \
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
15 DEF:core2=$HOME/.temps.rrd:core2-temp:AVERAGE \
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
16 DEF:core3=$HOME/.temps.rrd:core3-temp:AVERAGE \
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
17 DEF:core4=$HOME/.temps.rrd:core4-temp:AVERAGE \
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
18 DEF:isa1=$HOME/.temps.rrd:isa-temp1:AVERAGE \
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
19 DEF:isa2=$HOME/.temps.rrd:isa-temp2:AVERAGE \
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
20 DEF:isa3=$HOME/.temps.rrd:isa-temp3:AVERAGE \
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
21 DEF:gpu=$HOME/.temps.rrd:gpu:AVERAGE \
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
22 DEF:gpufan_raw=$HOME/.temps.rrd:gpu-fan:AVERAGE \
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
23 DEF:fan1_raw=$HOME/.temps.rrd:fan1:AVERAGE \
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
24 DEF:fan2_raw=$HOME/.temps.rrd:fan2:AVERAGE \
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
25 DEF:fan3_raw=$HOME/.temps.rrd:fan3:AVERAGE \
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
26 DEF:fan4_raw=$HOME/.temps.rrd:fan4:AVERAGE \
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
27 CDEF:fan1=fan1_raw,0.01,* \
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
28 CDEF:fan2=fan2_raw,0.01,* \
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
29 CDEF:fan3=fan3_raw,0.01,* \
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
30 CDEF:fan4=fan4_raw,0.01,* \
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
31 CDEF:gpufan=gpufan_raw,0.25,* \
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
32 LINE1:gpu#009900:"GPU" \
16
4b6ab7428895 Improve colours for sensors graph
IBBoard <dev@ibboard.co.uk>
parents: 12
diff changeset
33 LINE1:core1#99000080:"Core 1" \
4b6ab7428895 Improve colours for sensors graph
IBBoard <dev@ibboard.co.uk>
parents: 12
diff changeset
34 LINE1:core2#99000080:"Core 2" \
4b6ab7428895 Improve colours for sensors graph
IBBoard <dev@ibboard.co.uk>
parents: 12
diff changeset
35 LINE1:core3#99000080:"Core 3" \
4b6ab7428895 Improve colours for sensors graph
IBBoard <dev@ibboard.co.uk>
parents: 12
diff changeset
36 LINE1:core4#99000080:"Core 4" \
4b6ab7428895 Improve colours for sensors graph
IBBoard <dev@ibboard.co.uk>
parents: 12
diff changeset
37 LINE1:isa1#bbbb66:"ISA 1" \
4b6ab7428895 Improve colours for sensors graph
IBBoard <dev@ibboard.co.uk>
parents: 12
diff changeset
38 LINE1:isa2#bbbb66:"ISA 2" \
4b6ab7428895 Improve colours for sensors graph
IBBoard <dev@ibboard.co.uk>
parents: 12
diff changeset
39 LINE1:isa3#bbbb66:"ISA 3" \
4b6ab7428895 Improve colours for sensors graph
IBBoard <dev@ibboard.co.uk>
parents: 12
diff changeset
40 AREA:fan1#00009980:"CPU Fan" \
4b6ab7428895 Improve colours for sensors graph
IBBoard <dev@ibboard.co.uk>
parents: 12
diff changeset
41 AREA:fan2#00009980:"Rear Fan" \
12
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
42 AREA:gpufan#00990080:"GPU Fan" \
16
4b6ab7428895 Improve colours for sensors graph
IBBoard <dev@ibboard.co.uk>
parents: 12
diff changeset
43 AREA:fan3#00009980:"Front Fan 1" \
4b6ab7428895 Improve colours for sensors graph
IBBoard <dev@ibboard.co.uk>
parents: 12
diff changeset
44 AREA:fan4#00009980:"Front Fan 2" \
12
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
45 && eog /tmp/temps.png
3adc69ceb249 Add sensor recording and graph generating scripts
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
46 rm /tmp/temps.png