From c9b5911f29cc21abfa3c32731ba774f46f321096 Mon Sep 17 00:00:00 2001 From: Matt Rude Date: Sat, 18 Jun 2011 21:29:32 -0500 Subject: more script cleanup --- scripts/do-build-site | 2 +- scripts/do-xntp | 536 ++++++++++------------------------------ scripts/templates/template-host | 14 +- 3 files changed, 138 insertions(+), 414 deletions(-) (limited to 'scripts') diff --git a/scripts/do-build-site b/scripts/do-build-site index c381cb0..1a66d2a 100755 --- a/scripts/do-build-site +++ b/scripts/do-build-site @@ -32,7 +32,7 @@ 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 + for a in clients offset jitter frequency sjit cjit wander disp do mkdir -p $POOLPAGE/$X/$a cat /dev/null > out.template diff --git a/scripts/do-xntp b/scripts/do-xntp index f0ffe0f..5b3b4c2 100755 --- a/scripts/do-xntp +++ b/scripts/do-xntp @@ -18,416 +18,140 @@ 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 - -# 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 \ ---end=-300 \ ---title="${X} - Number of Active Clients" \ ---rigid \ ---height=200 \ ---width=600 \ ---alt-autoscale-max \ ---lower-limit=0 \ ---vertical-label='Number of Clients' \ ---slope-mode \ ---font TITLE:12: \ ---font AXIS:8: \ ---font LEGEND:10: \ ---font UNIT:8: \ -DEF:a="/var/www/time.mattrude.com/rrd/${X}-clients.rrd":clients:AVERAGE \ -DEF:b="/var/www/time.mattrude.com/rrd/${X}-clients.rrd":abusive:AVERAGE \ -AREA:a#002A97FF:"Clients:" \ -GPRINT:a:LAST:"Current\:%8.2lf %s" \ -GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \ -GPRINT:a:MAX:"Maximum\:%8.2lf %s\n" \ -AREA:b#F51D30FF:"Abusive:" \ -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}/daily-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,/ \ - AREA:noffset#002A97FF:"offset" \ - GPRINT:noffset:LAST:%le - -${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/daily-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,/ \ - LINE2:nsjit#002A97FF:"sysjit" \ - GPRINT:nsjit:LAST:%le - -${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/daily-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,/ \ - LINE2:ncjit#002A97FF:"cjit" \ - GPRINT:ncjit:LAST:%le - -${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/daily-ntp-wander.png \ - --width 600 --height 200 \ - --vertical-label "${X}" \ - --title "`TZ=UTC date`" \ - --start -93600 \ - DEF:wander=${RRDPAGE}/${X}.rrd:wander:LAST \ - LINE2:wander#002A97FF:"Wander" \ - GPRINT:wander:LAST:%le - -${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/daily-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 \ - AREA:freq#002A97FF:"Frequency (ppm)" \ - GPRINT:freq:LAST:%lf - -${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/daily-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,/ \ - AREA:ndisp#002A97FF:"Dispersion" \ - GPRINT:ndisp:LAST:%lf - -${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/daily-ntp-jitter.png \ - --width 600 --height 200 \ - --alt-autoscale \ - --vertical-label "${X}" \ - --title "`TZ=UTC date`" \ - --start -93600 \ - DEF:disp=${RRDPAGE}/${X}.rrd:jitter:LAST \ - LINE2:disp#002A97FF:"Jitter" \ - GPRINT:disp:LAST:%lf - -# 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`" \ - --start -691200 \ - 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}/weekly-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,/ \ - AREA:noffset#002A97FF:"offset" \ - GPRINT:noffset:LAST:%le - -${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/weekly-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,/ \ - LINE2:nsjit#002A97FF:"sysjit" \ - GPRINT:nsjit:LAST:%le - -${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/weekly-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,/ \ - LINE2:ncjit#002A97FF:"clkjit" \ - GPRINT:ncjit:LAST:%le - -${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/weekly-ntp-wander.png \ - --width 600 --height 200 \ - --vertical-label "${X}" \ - --title "`TZ=UTC date`" \ - --start -691200 \ - DEF:wander=${RRDPAGE}/${X}.rrd:wander:LAST \ - LINE2:wander#002A97FF:"wander" \ - GPRINT:wander:LAST:%le - -${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/weekly-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 \ - AREA:freq#002A97FF:"frequency (ppm)" \ - GPRINT:freq:LAST:%lf - - -${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/weekly-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,/ \ - AREA:ndisp#002A97FF:"dispersion" \ - GPRINT:ndisp:LAST:%lf - -${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/weekly-ntp-jitter.png \ - --width 600 --height 200 \ - --alt-autoscale \ - --vertical-label "${X}" \ - --title "`TZ=UTC date`" \ - --start -691200 \ - DEF:disp=${RRDPAGE}/${X}.rrd:jitter:LAST \ - CDEF:ndisp=disp,1000,/ \ - 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 + sh ${SCRIPTS}/do-ntp-rrdstats ${X} + if [ ! $? ]; then exit 1; fi + + ${RRD_BIN}/rrdtool graph --imgformat=PNG ${STATUS}/${X}/daily-ntp-clients-small.png \ + --width=290 --height=100 --start=-86400 --end=-300 \ + --title='Kirby - 174.143.169.159' \ + --vertical-label='Active Clients' \ + 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" > /dev/null + + ${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/daily-ntp-clients.png \ + --width=600 --height=200 --start=-86400 \ + --title="${X} - Number of Active Clients" \ + --vertical-label='Number of Clients' \ + DEF:a="/var/www/time.mattrude.com/rrd/${X}-clients.rrd":clients:AVERAGE \ + DEF:b="/var/www/time.mattrude.com/rrd/${X}-clients.rrd":abusive:AVERAGE \ + AREA:a#002A97FF:"Clients:" \ + GPRINT:a:LAST:"Current\:%8.2lf %s" \ + GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \ + GPRINT:a:MAX:"Maximum\:%8.2lf %s\n" \ + AREA:b#F51D30FF:"Abusive:" \ + GPRINT:b:LAST:" Current\:%8.2lf %s" \ + GPRINT:b:AVERAGE:"Average\:%8.2lf %s" \ + GPRINT:b:MAX:"Maximum\:%8.2lf %s\n" > /dev/null + + ${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/weekly-ntp-clients.png \ + --width=600 --height=200 --start=-691200 \ + --title="${X} - Number of Active Clients" \ + --vertical-label='Number of Clients' \ + DEF:a="/var/www/time.mattrude.com/rrd/${X}-clients.rrd":clients:AVERAGE \ + DEF:b="/var/www/time.mattrude.com/rrd/${X}-clients.rrd":abusive:AVERAGE \ + AREA:a#002A97FF:"Clients:" \ + GPRINT:a:LAST:"Current\:%8.2lf %s" \ + GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \ + GPRINT:a:MAX:"Maximum\:%8.2lf %s\n" \ + AREA:b#F51D30FF:"Abusive:" \ + GPRINT:b:LAST:" Current\:%8.2lf %s" \ + GPRINT:b:AVERAGE:"Average\:%8.2lf %s" \ + GPRINT:b:MAX:"Maximum\:%8.2lf %s\n" > /dev/null + + ${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/monthly-ntp-clients.png \ + --width=600 --height=200 --start=-2629744 \ + --title="${X} - Number of Active Clients" \ + --vertical-label='Number of Clients' \ + DEF:a="/var/www/time.mattrude.com/rrd/${X}-clients.rrd":clients:AVERAGE \ + DEF:b="/var/www/time.mattrude.com/rrd/${X}-clients.rrd":abusive:AVERAGE \ + AREA:a#002A97FF:"Clients:" \ + GPRINT:a:LAST:"Current\:%8.2lf %s" \ + GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \ + GPRINT:a:MAX:"Maximum\:%8.2lf %s\n" \ + AREA:b#F51D30FF:"Abusive:" \ + GPRINT:b:LAST:" Current\:%8.2lf %s" \ + GPRINT:b:AVERAGE:"Average\:%8.2lf %s" \ + GPRINT:b:MAX:"Maximum\:%8.2lf %s\n" > /dev/null + + ${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/yearly-ntp-clients.png \ + --width=600 --height=200 --start=-31556926 \ + --title="${X} - Number of Active Clients" \ + --vertical-label='Number of Clients' \ + DEF:a="/var/www/time.mattrude.com/rrd/${X}-clients.rrd":clients:AVERAGE \ + DEF:b="/var/www/time.mattrude.com/rrd/${X}-clients.rrd":abusive:AVERAGE \ + AREA:a#002A97FF:"Clients:" \ + GPRINT:a:LAST:"Current\:%8.2lf %s" \ + GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \ + GPRINT:a:MAX:"Maximum\:%8.2lf %s\n" \ + AREA:b#F51D30FF:"Abusive:" \ + GPRINT:b:LAST:" Current\:%8.2lf %s" \ + GPRINT:b:AVERAGE:"Average\:%8.2lf %s" \ + GPRINT:b:MAX:"Maximum\:%8.2lf %s\n" > /dev/null + + for a in offset sjit cjit wander freq disp jitter + do + ${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/daily-ntp-${a}.png \ + --width 600 --height 200 --start -86400 \ + --title "`TZ=UTC date`" \ + --vertical-label "${X}" \ + DEF:${a}=${RRDPAGE}/${X}.rrd:${a}:LAST \ + CDEF:n${a}=${a},1000,/ \ + AREA:n${a}#002A97FF:"${a}" \ + GPRINT:n${a}:LAST:%le > /dev/null + + ${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/weekly-ntp-${a}.png \ + --width 600 --height 200 --start -691200 \ + --title "`TZ=UTC date`" \ + --vertical-label "${X}" \ + DEF:${a}=${RRDPAGE}/${X}.rrd:${a}:LAST \ + CDEF:n${a}=${a},1000,/ \ + AREA:n${a}#002A97FF:"${a}" \ + GPRINT:n${a}:LAST:%le > /dev/null + + ${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/monthly-ntp-${a}.png \ + --width 600 --height 200 --start -2629744 \ + --title "`TZ=UTC date`" \ + --vertical-label "${X}" \ + DEF:${a}=${RRDPAGE}/${X}.rrd:${a}:LAST \ + CDEF:n${a}=${a},1000,/ \ + AREA:n${a}#002A97FF:"${a}" \ + GPRINT:n${a}:LAST:%le > /dev/null + + ${RRD_BIN}/rrdtool graph --imgformat PNG ${STATUS}/${X}/yearly-ntp-${a}.png \ + --width 600 --height 200 --start -31556926 \ + --title "`TZ=UTC date`" \ + --vertical-label "${X}" \ + DEF:${a}=${RRDPAGE}/${X}.rrd:${a}:LAST \ + CDEF:n${a}=${a},1000,/ \ + AREA:n${a}#002A97FF:"${a}" \ + GPRINT:n${a}:LAST:%le > /dev/null + + done 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" + --width=290 --height=72 --start=-86400 \ + --title='Active Clients on All Servers' \ + --vertical-label='Active Clients' \ + 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" > /dev/null rm -f /var/www/time.mattrude.com/logs/ntp-stats-samantha.log /var/www/time.mattrude.com/logs/ntp-stats-twyla.log diff --git a/scripts/templates/template-host b/scripts/templates/template-host index 6dfcfe0..adac229 100644 --- a/scripts/templates/template-host +++ b/scripts/templates/template-host @@ -25,11 +25,11 @@ rootdisp total dispersion to the primary reference clock

Host POOL, Daily Status

-

-

-

-

-

-

-

+

+

+

+

+

+

+


-- cgit v1.2.3-59-ga6da