aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/do-build-graphs
blob: d88ccb380fbc708198a906617f787794cb046d28 (plain)
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
84
#!/bin/sh

RRD_BIN=/usr/bin
RRDPAGE=/var/www/time.mattrude.com/rrd
GRAPHS=/var/www/time.mattrude.com/graphs
SCRIPTS=/var/www/time.mattrude.com/scripts

if [ ! -e $GRAPHS ]; then
   mkdir -p $GRAPHS
fi

cd ${RRDPAGE}

${RRD_BIN}/rrdtool graph \
   --imgformat=PNG ${GRAPHS}/kirby-clients.png \
--start=-86400 --end=-300 \
--title='Kirby - 174.143.169.159' \
--rigid \
--height=100 \
--width=290 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label='Active Clients' \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:8: \
--font UNIT:8: \
DEF:a="/var/www/time.mattrude.com/rrd/kriby-client.rrd":clients:AVERAGE \
AREA:a#002A97FF:"" \
GPRINT:a:LAST:"Now\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Avg\:%8.2lf %s" \
GPRINT:a:MAX:"Max\:%8.2lf %s\n" \

${RRD_BIN}/rrdtool graph \
   --imgformat=PNG ${GRAPHS}/twyla-clients.png \
--start=-86400 --end=-300 \
--title='Twyla - 174.143.174.61' \
--rigid \
--height=100 \
--width=290 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label='Active Clients' \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:8: \
--font UNIT:8: \
DEF:a="/var/www/time.mattrude.com/rrd/twyla-client.rrd":clients:AVERAGE \
AREA:a#002A97FF:"" \
GPRINT:a:LAST:"Now\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Avg\:%8.2lf %s" \
GPRINT:a:MAX:"Max\:%8.2lf %s\n" \

${RRD_BIN}/rrdtool graph \
   --imgformat=PNG ${GRAPHS}/samantha-clients.png \
--start=-86400 --end=-300 \
--title='Samantha - 174.143.173.49' \
--rigid \
--height=100 \
--width=290 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label='Active Clients' \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:8: \
--font UNIT:8: \
DEF:a="/var/www/time.mattrude.com/rrd/samantha-client.rrd":clients:AVERAGE \
AREA:a#002A97FF:"" \
GPRINT:a:LAST:"Now\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Avg\:%8.2lf %s" \
GPRINT:a:MAX:"Max\:%8.2lf %s\n" \


/usr/bin/optipng ${GRAPHS}/kirby-clients.png
/usr/bin/optipng ${GRAPHS}/twyla-clients.png
/usr/bin/optipng ${GRAPHS}/samantha-clients.png

#end