aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/do-xntp
blob: f3ebe99c5243669d154eb5b02653154222b39e86 (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
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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#!/bin/sh

RRD_BIN=/usr/local/bin
RRDPAGE=/usr/local/www/data/rrd
SCRIPTS=/usr/local/www/data/scripts

cd ${RRDPAGE}

if [ ! $? ]; then exit 1; fi

for X in `cat list-of-systems`

do

sh ${SCRIPTS}/do-ntp-rrdstats ${X}

if [ ! $? ]; then exit 1; fi

${RRD_BIN}/rrdtool graph \
    --imgformat PNG ${RRDPAGE}/${X}-ntp-offset.png \
    --width 600 --height 200 \
	--vertical-label "${X}" \
	--title "`TZ=UTC date`" \
        --start -93600 \
        DEF:offset=${RRDPAGE}/${X}.rrd:offset:LAST \
	CDEF:noffset=offset,1000,/ \
        LINE1:noffset#0000FF:"offset" \
	GPRINT:noffset:LAST:%le

${RRD_BIN}/rrdtool graph \
    --imgformat PNG ${RRDPAGE}/${X}-ntp-sysjit.png \
    --width 600 --height 200 \
	--vertical-label "${X}" \
	--title "`TZ=UTC date`" \
        --start -93600 \
        DEF:sjit=${RRDPAGE}/${X}.rrd:sjit:LAST \
	CDEF:nsjit=sjit,1000,/ \
        LINE1:nsjit#0000FF:"sysjit" \
	GPRINT:nsjit:LAST:%le

${RRD_BIN}/rrdtool graph \
    --imgformat PNG ${RRDPAGE}/${X}-ntp-clkjit.png \
    --width 600 --height 200 \
	--vertical-label "${X}" \
	--title "`TZ=UTC date`" \
        --start -93600 \
        DEF:cjit=${RRDPAGE}/${X}.rrd:cjit:LAST \
	CDEF:ncjit=cjit,1000,/ \
        LINE1:ncjit#0000FF:"cjit" \
	GPRINT:ncjit:LAST:%le

${RRD_BIN}/rrdtool graph  \
    --imgformat PNG ${RRDPAGE}/${X}-ntp-wander.png \
    --width 600 --height 200 \
	--vertical-label "${X}" \
	--title "`TZ=UTC date`" \
        --start -93600 \
        DEF:wander=${RRDPAGE}/${X}.rrd:wander:LAST \
        LINE1:wander#0000FF:"wander" \
	GPRINT:wander:LAST:%le

${RRD_BIN}/rrdtool graph \
    --imgformat PNG ${RRDPAGE}/${X}-ntp-freq.png \
    --width 600 --height 200 \
    --alt-autoscale \
	--vertical-label "${X}" \
	--title "`TZ=UTC date`" \
        --start -93600 \
        DEF:freq=${RRDPAGE}/${X}.rrd:freq:LAST \
        LINE1:freq#0000FF:"frequency (ppm)" \
	GPRINT:freq:LAST:%lf

${RRD_BIN}/rrdtool graph \
    --imgformat PNG ${RRDPAGE}/${X}-ntp-disp.png \
    --width 600 --height 200 \
    --alt-autoscale \
	--vertical-label "${X}" \
	--title "`TZ=UTC date`" \
        --start -93600 \
        DEF:disp=${RRDPAGE}/${X}.rrd:disp:LAST \
	CDEF:ndisp=disp,1000,/ \
        LINE1:ndisp#0000FF:"dispersion" \
	GPRINT:ndisp:LAST:%lf

# fat (weekly) graphs


${RRD_BIN}/rrdtool graph --imgformat PNG ${RRDPAGE}/${X}-week-ntp-offset.png \
    --width 600 --height 200 \
	--vertical-label "${X}" \
	--title "`TZ=UTC date`" \
        --start -691200 \
        DEF:offset=${RRDPAGE}/${X}.rrd:offset:LAST \
	CDEF:noffset=offset,1000,/ \
        LINE1:noffset#0000FF:"offset" \
	GPRINT:noffset:LAST:%le

${RRD_BIN}/rrdtool graph --imgformat PNG ${RRDPAGE}/${X}-week-ntp-sysjit.png \
    --width 600 --height 200 \
	--vertical-label "${X}" \
	--title "`TZ=UTC date`" \
        --start -691200 \
        DEF:sjit=${RRDPAGE}/${X}.rrd:sjit:LAST \
	CDEF:nsjit=sjit,1000,/ \
        LINE1:nsjit#0000FF:"sysjit" \
	GPRINT:nsjit:LAST:%le

${RRD_BIN}/rrdtool graph --imgformat PNG ${RRDPAGE}/${X}-week-ntp-clkjit.png \
    --width 600 --height 200 \
	--vertical-label "${X}" \
	--title "`TZ=UTC date`" \
        --start -691200 \
        DEF:cjit=${RRDPAGE}/${X}.rrd:cjit:LAST \
	CDEF:ncjit=cjit,1000,/ \
        LINE1:ncjit#0000FF:"clkjit" \
	GPRINT:ncjit:LAST:%le

${RRD_BIN}/rrdtool graph --imgformat PNG ${RRDPAGE}/${X}-week-ntp-wander.png \
    --width 600 --height 200 \
	--vertical-label "${X}" \
	--title "`TZ=UTC date`" \
        --start -691200 \
        DEF:wander=${RRDPAGE}/${X}.rrd:wander:LAST \
        LINE1:wander#0000FF:"wander" \
	GPRINT:wander:LAST:%le

${RRD_BIN}/rrdtool graph \
    --imgformat PNG ${RRDPAGE}/${X}-week-ntp-freq.png \
    --width 600 --height 200 \
    --alt-autoscale \
	--vertical-label "${X}" \
	--title "`TZ=UTC date`" \
        --start -691200 \
        DEF:freq=${RRDPAGE}/${X}.rrd:freq:LAST \
        LINE1:freq#0000FF:"frequency (ppm)" \
	GPRINT:freq:LAST:%lf


${RRD_BIN}/rrdtool graph \
    --imgformat PNG ${RRDPAGE}/${X}-week-ntp-disp.png \
    --width 600 --height 200 \
    --alt-autoscale \
	--vertical-label "${X}" \
	--title "`TZ=UTC date`" \
        --start -691200 \
        DEF:disp=${RRDPAGE}/${X}.rrd:disp:LAST \
	CDEF:ndisp=disp,1000,/ \
        LINE1:ndisp#0000FF:"dispersion" \
	GPRINT:ndisp:LAST:%lf

done

#end