forked from spaceharrier/dogcam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake_graphs_day.sh
executable file
·86 lines (77 loc) · 2.13 KB
/
make_graphs_day.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#!/bin/sh
# Create RRD Graphs of recorded parameters
# Movement
rrdtool graph /var/www/graphs/movement_day.png \
-a PNG \
-g \
--slope-mode \
--start -86400 --end now \
--font DEFAULT:7: \
--upper-limit 60 \
--lower-limit 0 \
--title "Movement" \
--vertical-label "Seconds Active" \
--color BACK#000000 \
--color CANVAS#000000 \
--color FONT#FFFFFF \
--color SHADEA#222222 \
--color SHADEB#222222 \
--color MGRID#ff0000 \
DEF:movement_count=""/var/rrd/movement.rrd"":movement_count:AVERAGE \
AREA:movement_count#0000ff:"Movement"
# Noise
rrdtool graph /var/www/graphs/noise_day.png \
-a PNG \
-g \
--slope-mode \
--start -28800 --end now \
--font DEFAULT:7: \
--upper-limit 10 \
--lower-limit 0 \
--title "Noise" \
--vertical-label "Seconds Noisy" \
--color BACK#000000 \
--color CANVAS#000000 \
--color FONT#FFFFFF \
--color SHADEA#222222 \
--color SHADEB#222222 \
--color MGRID#ff0000 \
DEF:noise_count=""/var/rrd/noise.rrd"":noise_count:AVERAGE \
AREA:noise_count#ff0000:"Noise"
# Temperature
rrdtool graph /var/www/graphs/temperature_f_day.png \
-a PNG \
-g \
--slope-mode \
--start -86400 --end now \
--font DEFAULT:7: \
--title "Daily" \
--vertical-label "Temperature (°F)" \
--color BACK#000000 \
--color CANVAS#000000 \
--color FONT#FFFFFF \
--color SHADEA#222222 \
--color SHADEB#222222 \
--color MGRID#ff0000 \
--x-grid MINUTE:30:HOUR:6:HOUR:12:0:"%a %H:%M" \
DEF:temperature_f=""/var/rrd/temp.rrd"":temperature_f:MAX \
CDEF:trended_f=temperature_f,1800,TREND \
LINE:trended_f#00ff00:"Temperature (°F)"
rrdtool graph /var/www/graphs/temperature_c_day.png \
-a PNG \
-g \
--slope-mode \
--start -86400 --end now \
--font DEFAULT:7: \
--title "Daily" \
--vertical-label "Temperature (°C)" \
--color BACK#000000 \
--color CANVAS#000000 \
--color FONT#FFFFFF \
--color SHADEA#222222 \
--color SHADEB#222222 \
--color MGRID#ff0000 \
--x-grid MINUTE:30:HOUR:6:HOUR:12:0:"%a %H:%M" \
DEF:temperature_c=""/var/rrd/temp.rrd"":temperature_c:MAX \
CDEF:trended_c=temperature_c,1800,TREND \
LINE:trended_c#ffff00:"Temperature (°C)" \