-
Notifications
You must be signed in to change notification settings - Fork 0
/
ntp_png
executable file
·118 lines (106 loc) · 3.22 KB
/
ntp_png
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#!/usr/bin/env bash
source_dir="$(cd $(dirname ${BASH_SOURCE[0]}) && pwd)"
cd "$source_dir"
OUTPUT_DIR="htdocs/"
rrdtool graph --end now --start end-1159s \
--width 1160 --height 250 \
--lower-limit 0 \
--font DEFAULT:0:"Helvetica" \
--grid-dash 1:2 \
--vertical-label "NTP Requests per second" \
--slope-mode \
20m.png \
DEF:req=ntp1.rrd:req:MAX:step=1 \
DEF:reqa=ntp1.rrd:req:AVERAGE:step=2 \
VDEF:reqmax=req,MAXIMUM \
LINE2:reqa#D8B8B8 \
LINE1:reqmax#E0E0FF \
LINE1:req#FF0000 > /dev/null
rrdtool graph --end now --start end-7200s \
--width 1160 --height 250 \
--lower-limit 0 \
--font DEFAULT:0:"Helvetica" \
--grid-dash 1:2 \
--vertical-label "NTP Requests per second" \
--slope-mode \
2h.png \
DEF:req=ntp1.rrd:req:MAX:step=1 \
DEF:reqa=ntp1.rrd:req:AVERAGE:step=1 \
VDEF:reqmax=req,MAXIMUM \
LINE2:reqa#D0B0B0 \
LINE1:reqmax#E0E0FF \
LINE1:req#FF0000 > /dev/null
rrdtool graph --end now --start end-12h \
--width 1160 --height 250 \
--lower-limit 0 \
--font DEFAULT:0:"Helvetica" \
--grid-dash 1:2 \
--vertical-label "NTP Requests per second" \
--slope-mode \
12h.png \
DEF:req=ntp1.rrd:req:MAX:step=1 \
DEF:reqa=ntp1.rrd:req:AVERAGE:step=1 \
VDEF:reqmax=req,MAXIMUM \
LINE2:reqa#D0B0B0 \
LINE1:reqmax#E0E0FF \
LINE1:req#FF0000 > /dev/null
rrdtool graph --end now --start end-48h \
--width 1160 --height 250 \
--lower-limit 0 \
--font DEFAULT:0:"Helvetica" \
--grid-dash 1:2 \
--vertical-label "NTP Requests per second" \
--slope-mode \
48h.png \
DEF:req=ntp1.rrd:req:MAX:step=1 \
DEF:reqa=ntp1.rrd:req:AVERAGE:step=1 \
VDEF:reqmax=req,MAXIMUM \
LINE2:reqa#D0B0B0 \
LINE1:reqmax#E0E0FF \
LINE1:req#FF0000 > /dev/null
rrdtool graph --end now --start end-10d \
--width 1160 --height 250 \
--lower-limit 0 \
--font DEFAULT:0:"Helvetica" \
--grid-dash 1:2 \
--vertical-label "NTP Requests per second" \
--slope-mode \
10d.png \
DEF:req=ntp1.rrd:req:MAX:step=1 \
DEF:reqa=ntp1.rrd:req:AVERAGE:step=1 \
VDEF:reqmax=req,MAXIMUM \
LINE2:reqa#D0B0B0 \
LINE1:reqmax#E0E0FF \
LINE1:req#FF0000 > /dev/null
rrdtool graph --end now --start end-30d \
--width 1160 --height 250 \
--lower-limit 0 \
--font DEFAULT:0:"Helvetica" \
--grid-dash 1:2 \
--vertical-label "NTP Requests per second" \
--slope-mode \
30d.png \
DEF:req=ntp1.rrd:req:AVERAGE:step=3600 \
VDEF:reqmax=req,AVERAGE \
LINE2:reqmax#FFFF00 \
LINE1:req#0000FF > /dev/null
rrdtool graph --end now --start end-1y \
--width 1160 --height 250 \
--lower-limit 0 \
--font DEFAULT:0:"Helvetica" \
--grid-dash 1:2 \
--vertical-label "NTP Requests per second" \
--slope-mode \
1y.png \
DEF:req=ntp1.rrd:req:AVERAGE \
VDEF:reqmax=req,AVERAGE \
LINE2:reqmax#FFFF00 \
LINE1:req#0000FF > /dev/null
convert -define png:compression-filter=3 -define png:compression-level=9 20m.png 20m.png
convert -define png:compression-filter=3 -define png:compression-level=9 2h.png 2h.png
convert -define png:compression-filter=3 -define png:compression-level=9 12h.png 12h.png
convert -define png:compression-filter=3 -define png:compression-level=9 48h.png 48h.png
convert -define png:compression-filter=3 -define png:compression-level=9 10d.png 10d.png
convert -define png:compression-filter=3 -define png:compression-level=9 30d.png 30d.png
convert -define png:compression-filter=3 -define png:compression-level=9 1y.png 1y.png
mv -f *.png ${OUTPUT_DIR}