aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMatt Rude <[email protected]>2011-06-18 19:04:18 -0500
committerMatt Rude <[email protected]>2011-06-18 19:04:18 -0500
commitfb8bc5d6dbf612a7c7962dcd61201038c8b6b3eb (patch)
treecfd164fd208957741a491a35267bc9081252c35c /scripts
parentf32dcebd70a3ccca3dee8924797da1aae502e450 (diff)
downloadtime.mattrude.com-fb8bc5d6dbf612a7c7962dcd61201038c8b6b3eb.tar.gz
time.mattrude.com-fb8bc5d6dbf612a7c7962dcd61201038c8b6b3eb.tar.bz2
time.mattrude.com-fb8bc5d6dbf612a7c7962dcd61201038c8b6b3eb.zip
Update to status screens, now show daily, weekly, monthly, & yearly
graphs on a per type & host page.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/do-build-graphs115
-rwxr-xr-xscripts/do-build-site9
-rwxr-xr-xscripts/do-xntp276
-rw-r--r--scripts/templates/template5
-rw-r--r--scripts/templates/template-by-type26
-rw-r--r--scripts/templates/template-host42
6 files changed, 279 insertions, 194 deletions
diff --git a/scripts/do-build-graphs b/scripts/do-build-graphs
deleted file mode 100755
index f17e5f6..0000000
--- a/scripts/do-build-graphs
+++ /dev/null
@@ -1,115 +0,0 @@
-#!/bin/sh
-
-RRD_BIN=/usr/bin
-RRDPAGE=/var/www/time.mattrude.com/rrd
-GRAPHS=/var/www/time.mattrude.com/status
-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/kirby.mattrude.com-clients.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.mattrude.com-clients.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.mattrude.com-clients.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}/all-clients.png \
---start=-86400 --end=-300 \
---title='Active Clients on All Servers' \
---rigid \
---height=72 \
---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/kirby.mattrude.com-clients.rrd":clients:AVERAGE \
-DEF:b="/var/www/time.mattrude.com/rrd/twyla.mattrude.com-clients.rrd":clients:AVERAGE \
-DEF:c="/var/www/time.mattrude.com/rrd/samantha.mattrude.com-clients.rrd":clients:AVERAGE \
-LINE1:a#002A97FF:"Kirby:" \
-GPRINT:a:LAST:"Now\:%6.2lf %s" \
-GPRINT:a:AVERAGE:"Avg\:%6.2lf %s" \
-GPRINT:a:MAX:"Max\:%6.2lf %s\n" \
-LINE1:b#000000FF:"Twyla:" \
-GPRINT:b:LAST:"Now\:%6.2lf %s" \
-GPRINT:b:AVERAGE:"Avg\:%6.2lf %s" \
-GPRINT:b:MAX:"Max\:%6.2lf %s\n" \
-LINE1:c#990000FF:"Saman:" \
-GPRINT:c:LAST:"Now\:%6.2lf %s" \
-GPRINT:c:AVERAGE:"Avg\:%6.2lf %s" \
-GPRINT:c:MAX:"Max\:%6.2lf %s\n" \
-
-/usr/bin/optipng ${GRAPHS}/kirby-clients.png
-/usr/bin/optipng ${GRAPHS}/twyla-clients.png
-/usr/bin/optipng ${GRAPHS}/samantha-clients.png
-/usr/bin/optipng ${GRAPHS}/all-clients.png
-
-#end
-
-
diff --git a/scripts/do-build-site b/scripts/do-build-site
index 0399467..c381cb0 100755
--- a/scripts/do-build-site
+++ b/scripts/do-build-site
@@ -32,5 +32,14 @@ do
sync
cat out.template $TEMPLATESDIR/index-tail > $X/index.html
rm -f out.template
+ for a in clients offset jitter frequency sysjit cjit wander disp
+ do
+ mkdir -p $POOLPAGE/$X/$a
+ cat /dev/null > out.template
+ sed -e s/POOL/$X/g $TEMPLATESDIR/template-by-type |sed -e s/TYPE/$a/g >> out.template
+ sync
+ cat out.template $TEMPLATESDIR/index-tail > $X/$a/index.html
+ rm -f out.template
+ done
done
chown -R apache:apache $POOLPAGE
diff --git a/scripts/do-xntp b/scripts/do-xntp
index b5e612a..f0ffe0f 100755
--- a/scripts/do-xntp
+++ b/scripts/do-xntp
@@ -25,19 +25,29 @@ sh ${SCRIPTS}/do-ntp-rrdstats ${X}
if [ ! $? ]; then exit 1; fi
-#${RRD_BIN}/rrdtool graph \
-# --imgformat PNG ${STATUS}/${X}/ntp-clients.png \
-# --width 600 --height 200 \
-# --vertical-label "${X}" \
-# --title "`TZ=UTC date`" \
-# --start -93600 \
-# DEF:clients=${RRDPAGE}/${X}-clients.rrd:clients:AVERAGE \
-# CDEF:noclients=clients,1,/ \
-# AREA:noclients#002A97FF:"Cients" \
-# GPRINT:noclients:LAST:%le
-
-${RRD_BIN}/rrdtool graph \
---imgformat PNG ${STATUS}/${X}/ntp-clients.png \
+# Daily Graphs
+${RRD_BIN}/rrdtool graph --imgformat=PNG ${STATUS}/${X}/daily-ntp-clients-small.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/kirby.mattrude.com-clients.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 ${STATUS}/${X}/daily-ntp-clients.png \
--lazy \
--imgformat=PNG \
--start=-86400 \
@@ -65,8 +75,7 @@ GPRINT:b:LAST:" Current\:%8.2lf %s" \
GPRINT:b:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:b:MAX:"Maximum\:%8.2lf %s\n"
-${RRD_BIN}/rrdtool graph \
- --imgformat PNG ${STATUS}/${X}/ntp-offset.png \
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/daily-ntp-offset.png \
--width 600 --height 200 \
--vertical-label "${X}" \
--title "`TZ=UTC date`" \
@@ -76,8 +85,7 @@ ${RRD_BIN}/rrdtool graph \
AREA:noffset#002A97FF:"offset" \
GPRINT:noffset:LAST:%le
-${RRD_BIN}/rrdtool graph \
- --imgformat PNG ${STATUS}/${X}/ntp-sysjit.png \
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/daily-ntp-sysjit.png \
--width 600 --height 200 \
--vertical-label "${X}" \
--title "`TZ=UTC date`" \
@@ -87,8 +95,7 @@ ${RRD_BIN}/rrdtool graph \
LINE2:nsjit#002A97FF:"sysjit" \
GPRINT:nsjit:LAST:%le
-${RRD_BIN}/rrdtool graph \
- --imgformat PNG ${STATUS}/${X}/ntp-clkjit.png \
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/daily-ntp-clkjit.png \
--width 600 --height 200 \
--vertical-label "${X}" \
--title "`TZ=UTC date`" \
@@ -98,8 +105,7 @@ ${RRD_BIN}/rrdtool graph \
LINE2:ncjit#002A97FF:"cjit" \
GPRINT:ncjit:LAST:%le
-${RRD_BIN}/rrdtool graph \
- --imgformat PNG ${STATUS}/${X}/ntp-wander.png \
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/daily-ntp-wander.png \
--width 600 --height 200 \
--vertical-label "${X}" \
--title "`TZ=UTC date`" \
@@ -108,8 +114,7 @@ ${RRD_BIN}/rrdtool graph \
LINE2:wander#002A97FF:"Wander" \
GPRINT:wander:LAST:%le
-${RRD_BIN}/rrdtool graph \
- --imgformat PNG ${STATUS}/${X}/ntp-freq.png \
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/daily-ntp-freq.png \
--width 600 --height 200 \
--alt-autoscale \
--vertical-label "${X}" \
@@ -119,8 +124,7 @@ ${RRD_BIN}/rrdtool graph \
AREA:freq#002A97FF:"Frequency (ppm)" \
GPRINT:freq:LAST:%lf
-${RRD_BIN}/rrdtool graph \
- --imgformat PNG ${STATUS}/${X}/ntp-disp.png \
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/daily-ntp-disp.png \
--width 600 --height 200 \
--alt-autoscale \
--vertical-label "${X}" \
@@ -131,8 +135,7 @@ ${RRD_BIN}/rrdtool graph \
AREA:ndisp#002A97FF:"Dispersion" \
GPRINT:ndisp:LAST:%lf
-${RRD_BIN}/rrdtool graph \
- --imgformat PNG ${STATUS}/${X}/ntp-jitter.png \
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/daily-ntp-jitter.png \
--width 600 --height 200 \
--alt-autoscale \
--vertical-label "${X}" \
@@ -142,10 +145,8 @@ ${RRD_BIN}/rrdtool graph \
LINE2:disp#002A97FF:"Jitter" \
GPRINT:disp:LAST:%lf
-# fat (weekly) graphs
-
-
-${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/week-ntp-clients.png \
+# Weekly Graphs
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/weekly-ntp-clients.png \
--width 600 --height 200 \
--vertical-label "${X}" \
--title "`TZ=UTC date`" \
@@ -156,7 +157,7 @@ ${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/week-ntp-clients.png \
GPRINT:nclients:LAST:%le
-${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/week-ntp-offset.png \
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/weekly-ntp-offset.png \
--width 600 --height 200 \
--vertical-label "${X}" \
--title "`TZ=UTC date`" \
@@ -166,7 +167,7 @@ ${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/week-ntp-offset.png \
AREA:noffset#002A97FF:"offset" \
GPRINT:noffset:LAST:%le
-${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/week-ntp-sysjit.png \
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/weekly-ntp-sysjit.png \
--width 600 --height 200 \
--vertical-label "${X}" \
--title "`TZ=UTC date`" \
@@ -176,7 +177,7 @@ ${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/week-ntp-sysjit.png \
LINE2:nsjit#002A97FF:"sysjit" \
GPRINT:nsjit:LAST:%le
-${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/week-ntp-clkjit.png \
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/weekly-ntp-clkjit.png \
--width 600 --height 200 \
--vertical-label "${X}" \
--title "`TZ=UTC date`" \
@@ -186,7 +187,7 @@ ${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/week-ntp-clkjit.png \
LINE2:ncjit#002A97FF:"clkjit" \
GPRINT:ncjit:LAST:%le
-${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/week-ntp-wander.png \
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/weekly-ntp-wander.png \
--width 600 --height 200 \
--vertical-label "${X}" \
--title "`TZ=UTC date`" \
@@ -195,8 +196,7 @@ ${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/week-ntp-wander.png \
LINE2:wander#002A97FF:"wander" \
GPRINT:wander:LAST:%le
-${RRD_BIN}/rrdtool graph \
- --imgformat PNG ${STATUS}/${X}/week-ntp-freq.png \
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/weekly-ntp-freq.png \
--width 600 --height 200 \
--alt-autoscale \
--vertical-label "${X}" \
@@ -207,8 +207,7 @@ ${RRD_BIN}/rrdtool graph \
GPRINT:freq:LAST:%lf
-${RRD_BIN}/rrdtool graph \
- --imgformat PNG ${STATUS}/${X}/week-ntp-disp.png \
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/weekly-ntp-disp.png \
--width 600 --height 200 \
--alt-autoscale \
--vertical-label "${X}" \
@@ -219,8 +218,7 @@ ${RRD_BIN}/rrdtool graph \
AREA:ndisp#002A97FF:"dispersion" \
GPRINT:ndisp:LAST:%lf
-${RRD_BIN}/rrdtool graph \
- --imgformat PNG ${STATUS}/${X}/week-ntp-jitter.png \
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/weekly-ntp-jitter.png \
--width 600 --height 200 \
--alt-autoscale \
--vertical-label "${X}" \
@@ -231,10 +229,206 @@ ${RRD_BIN}/rrdtool graph \
LINE2:ndisp#002A97FF:"Jitter" \
GPRINT:ndisp:LAST:%lf
+
+# Monthly Graphs
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/monthly-ntp-clients.png \
+ --width 600 --height 200 \
+ --vertical-label "${X}" \
+ --title "`TZ=UTC date`" \
+ --start -2629744 \
+ DEF:clients=${RRDPAGE}/${X}-clients.rrd:clients:AVERAGE \
+ CDEF:nclients=clients,1000,/ \
+ AREA:nclients#002A97FF:"clients" \
+ GPRINT:nclients:LAST:%le
+
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/monthly-ntp-offset.png \
+ --width 600 --height 200 \
+ --vertical-label "${X}" \
+ --title "`TZ=UTC date`" \
+ --start -2629744 \
+ DEF:offset=${RRDPAGE}/${X}.rrd:offset:LAST \
+ CDEF:noffset=offset,1000,/ \
+ AREA:noffset#002A97FF:"offset" \
+ GPRINT:noffset:LAST:%le
+
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/monthly-ntp-sysjit.png \
+ --width 600 --height 200 \
+ --vertical-label "${X}" \
+ --title "`TZ=UTC date`" \
+ --start -2629744 \
+ DEF:sjit=${RRDPAGE}/${X}.rrd:sjit:LAST \
+ CDEF:nsjit=sjit,1000,/ \
+ LINE2:nsjit#002A97FF:"sysjit" \
+ GPRINT:nsjit:LAST:%le
+
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/monthly-ntp-clkjit.png \
+ --width 600 --height 200 \
+ --vertical-label "${X}" \
+ --title "`TZ=UTC date`" \
+ --start -2629744 \
+ DEF:cjit=${RRDPAGE}/${X}.rrd:cjit:LAST \
+ CDEF:ncjit=cjit,1000,/ \
+ LINE2:ncjit#002A97FF:"clkjit" \
+ GPRINT:ncjit:LAST:%le
+
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/monthly-ntp-wander.png \
+ --width 600 --height 200 \
+ --vertical-label "${X}" \
+ --title "`TZ=UTC date`" \
+ --start -2629744 \
+ DEF:wander=${RRDPAGE}/${X}.rrd:wander:LAST \
+ LINE2:wander#002A97FF:"wander" \
+ GPRINT:wander:LAST:%le
+
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/monthly-ntp-freq.png \
+ --width 600 --height 200 \
+ --alt-autoscale \
+ --vertical-label "${X}" \
+ --title "`TZ=UTC date`" \
+ --start -2629744 \
+ DEF:freq=${RRDPAGE}/${X}.rrd:freq:LAST \
+ AREA:freq#002A97FF:"frequency (ppm)" \
+ GPRINT:freq:LAST:%lf
+
+
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/monthly-ntp-disp.png \
+ --width 600 --height 200 \
+ --alt-autoscale \
+ --vertical-label "${X}" \
+ --title "`TZ=UTC date`" \
+ --start -2629744 \
+ DEF:disp=${RRDPAGE}/${X}.rrd:disp:LAST \
+ CDEF:ndisp=disp,1000,/ \
+ AREA:ndisp#002A97FF:"dispersion" \
+ GPRINT:ndisp:LAST:%lf
+
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/monthly-ntp-jitter.png \
+ --width 600 --height 200 \
+ --alt-autoscale \
+ --vertical-label "${X}" \
+ --title "`TZ=UTC date`" \
+ --start -2629744 \
+ DEF:disp=${RRDPAGE}/${X}.rrd:jitter:LAST \
+ CDEF:ndisp=disp,1000,/ \
+ LINE2:ndisp#002A97FF:"Jitter" \
+ GPRINT:ndisp:LAST:%lf
+
+# Yearly Graphs
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/yearly-ntp-clients.png \
+ --width 600 --height 200 \
+ --vertical-label "${X}" \
+ --title "`TZ=UTC date`" \
+ --start -31556926 \
+ DEF:clients=${RRDPAGE}/${X}-clients.rrd:clients:AVERAGE \
+ CDEF:nclients=clients,1000,/ \
+ AREA:nclients#002A97FF:"clients" \
+ GPRINT:nclients:LAST:%le
+
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/yearly-ntp-offset.png \
+ --width 600 --height 200 \
+ --vertical-label "${X}" \
+ --title "`TZ=UTC date`" \
+ --start -31556926 \
+ DEF:offset=${RRDPAGE}/${X}.rrd:offset:LAST \
+ CDEF:noffset=offset,1000,/ \
+ AREA:noffset#002A97FF:"offset" \
+ GPRINT:noffset:LAST:%le
+
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/yearly-ntp-sysjit.png \
+ --width 600 --height 200 \
+ --vertical-label "${X}" \
+ --title "`TZ=UTC date`" \
+ --start -31556926 \
+ DEF:sjit=${RRDPAGE}/${X}.rrd:sjit:LAST \
+ CDEF:nsjit=sjit,1000,/ \
+ LINE2:nsjit#002A97FF:"sysjit" \
+ GPRINT:nsjit:LAST:%le
+
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/yearly-ntp-clkjit.png \
+ --width 600 --height 200 \
+ --vertical-label "${X}" \
+ --title "`TZ=UTC date`" \
+ --start -31556926 \
+ DEF:cjit=${RRDPAGE}/${X}.rrd:cjit:LAST \
+ CDEF:ncjit=cjit,1000,/ \
+ LINE2:ncjit#002A97FF:"clkjit" \
+ GPRINT:ncjit:LAST:%le
+
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/yearly-ntp-wander.png \
+ --width 600 --height 200 \
+ --vertical-label "${X}" \
+ --title "`TZ=UTC date`" \
+ --start -31556926 \
+ DEF:wander=${RRDPAGE}/${X}.rrd:wander:LAST \
+ LINE2:wander#002A97FF:"wander" \
+ GPRINT:wander:LAST:%le
+
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/yearly-ntp-freq.png \
+ --width 600 --height 200 \
+ --alt-autoscale \
+ --vertical-label "${X}" \
+ --title "`TZ=UTC date`" \
+ --start -31556926 \
+ DEF:freq=${RRDPAGE}/${X}.rrd:freq:LAST \
+ AREA:freq#002A97FF:"frequency (ppm)" \
+ GPRINT:freq:LAST:%lf
+
+
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/yearly-ntp-disp.png \
+ --width 600 --height 200 \
+ --alt-autoscale \
+ --vertical-label "${X}" \
+ --title "`TZ=UTC date`" \
+ --start -31556926 \
+ DEF:disp=${RRDPAGE}/${X}.rrd:disp:LAST \
+ CDEF:ndisp=disp,1000,/ \
+ AREA:ndisp#002A97FF:"dispersion" \
+ GPRINT:ndisp:LAST:%lf
+
+${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/yearly-ntp-jitter.png \
+ --width 600 --height 200 \
+ --alt-autoscale \
+ --vertical-label "${X}" \
+ --title "`TZ=UTC date`" \
+ --start -31556926 \
+ DEF:disp=${RRDPAGE}/${X}.rrd:jitter:LAST \
+ CDEF:ndisp=disp,1000,/ \
+ LINE2:ndisp#002A97FF:"Jitter" \
+ GPRINT:ndisp:LAST:%lf
done
#end
+${RRD_BIN}/rrdtool graph --imgformat=PNG ${STATUS}/all-clients.png \
+--start=-86400 --end=-300 \
+--title='Active Clients on All Servers' \
+--rigid \
+--height=72 \
+--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/kirby.mattrude.com-clients.rrd":clients:AVERAGE \
+DEF:b="/var/www/time.mattrude.com/rrd/twyla.mattrude.com-clients.rrd":clients:AVERAGE \
+DEF:c="/var/www/time.mattrude.com/rrd/samantha.mattrude.com-clients.rrd":clients:AVERAGE \
+LINE1:a#002A97FF:"Kirby:" \
+GPRINT:a:LAST:"Now\:%6.2lf %s" \
+GPRINT:a:AVERAGE:"Avg\:%6.2lf %s" \
+GPRINT:a:MAX:"Max\:%6.2lf %s\n" \
+LINE1:b#000000FF:"Twyla:" \
+GPRINT:b:LAST:"Now\:%6.2lf %s" \
+GPRINT:b:AVERAGE:"Avg\:%6.2lf %s" \
+GPRINT:b:MAX:"Max\:%6.2lf %s\n" \
+LINE1:c#990000FF:"Saman:" \
+GPRINT:c:LAST:"Now\:%6.2lf %s" \
+GPRINT:c:AVERAGE:"Avg\:%6.2lf %s" \
+GPRINT:c:MAX:"Max\:%6.2lf %s\n"
+
rm -f /var/www/time.mattrude.com/logs/ntp-stats-samantha.log /var/www/time.mattrude.com/logs/ntp-stats-twyla.log
ssh samantha /home/matt/bin/ntp/ntp_clients_stats > /var/www/time.mattrude.com/logs/ntp-stats-samantha.log
diff --git a/scripts/templates/template b/scripts/templates/template
index 3aefa90..86ea922 100644
--- a/scripts/templates/template
+++ b/scripts/templates/template
@@ -1,5 +1,2 @@
-<p>
<h2>Time Server: POOL</h2>
-<p>
-<a href="POOL/"><img src="/status/POOL/ntp-clients.png"></a>
-</p>
+<p><a href="/status/POOL/"><img src="/status/POOL/daily-ntp-clients.png"></a></p>
diff --git a/scripts/templates/template-by-type b/scripts/templates/template-by-type
new file mode 100644
index 0000000..2d28cb1
--- /dev/null
+++ b/scripts/templates/template-by-type
@@ -0,0 +1,26 @@
+<head>
+ <title>time.mattrude.com :: POOL:TYPE Time Server Status Page</title>
+ <link rel="stylesheet" type="text/css" href="/style.css"/>
+ <link rel="icon" href="/favicon.ico" type="image/x-icon" />
+</head>
+<html>
+<body>
+<div id="content">
+ <div id="primary" class="main">
+<div id="title">
+ <h1>time.mattrude.com <i>&mdash; POOL, TYPE Server Status</i></h1>
+</div>
+<p><a href="/">time.mattrude.com</a> / <a href="/status/">status</a> / <a href="/status/POOL/">POOL</a> / <strong>TYPE</strong></p>
+
+<h2>Host POOL, TYPE Daily Status</h2>
+<p><img src="/status/POOL/daily-ntp-TYPE.png"></p>
+
+<h2>Host POOL, TYPE Weekly Status</h2>
+<p><img src="/status/POOL/weekly-ntp-TYPE.png"></p>
+
+<h2>Host POOL, TYPE Monthly Status</h2>
+<p><img src="/status/POOL/monthly-ntp-TYPE.png"></p>
+
+<h2>Host POOL, TYPE Yearly Status</h2>
+<p><img src="/status/POOL/yearly-ntp-TYPE.png"></p>
+<br />
diff --git a/scripts/templates/template-host b/scripts/templates/template-host
index 72c00c8..6dfcfe0 100644
--- a/scripts/templates/template-host
+++ b/scripts/templates/template-host
@@ -22,40 +22,14 @@ clk_jitter clock jitter
clk_wander clock frequency wander (PPM)
rootdisp total dispersion to the primary reference clock
</pre>
-<br>
-<p>
<h2>Host POOL, Daily Status</h2>
-<p>
-<img src="/status/POOL/ntp-clients.png">
+<p><a href="/status/POOL/clients/"><img src="/status/POOL/daily-ntp-clients.png"></a></p>
+<p><a href="/status/POOL/clients/"><img src="/status/POOL/daily-ntp-offset.png"></a></p>
+<p><a href="/status/POOL/clients/"><img src="/status/POOL/daily-ntp-jitter.png"></a></p>
+<p><a href="/status/POOL/clients/"><img src="/status/POOL/daily-ntp-freq.png"></a></p>
+<p><a href="/status/POOL/clients/"><img src="/status/POOL/daily-ntp-sysjit.png"></a></p>
+<p><a href="/status/POOL/clients/"><img src="/status/POOL/daily-ntp-clkjit.png"></a></p>
+<p><a href="/status/POOL/clients/"><img src="/status/POOL/daily-ntp-wander.png"></a></p>
+<p><a href="/status/POOL/clients/"><img src="/status/POOL/daily-ntp-disp.png"></a></p>
<br />
-<img src="/status/POOL/ntp-offset.png">
-<br />
-<img src="/status/POOL/ntp-jitter.png">
-<br />
-<img src="/status/POOL/ntp-freq.png">
-<br />
-<img src="/status/POOL/ntp-sysjit.png">
-<br />
-<img src="/status/POOL/ntp-clkjit.png">
-<br />
-<img src="/status/POOL/ntp-wander.png">
-<br />
-<img src="/status/POOL/ntp-disp.png">
-<br />
-<h2>Host POOL, Weekly Status</h2>
-<br />
-<img src="/status/POOL/week-ntp-clients.png">
-<br />
-<img src="/status/POOL/week-ntp-jitter.png">
-<br />
-<img src="/status/POOL/week-ntp-freq.png">
-<br />
-<img src="/status/POOL/week-ntp-sysjit.png">
-<br />
-<img src="/status/POOL/week-ntp-clkjit.png">
-<br />
-<img src="/status/POOL/week-ntp-wander.png">
-<br />
-<img src="/status/POOL/week-ntp-disp.png">
-</p>