#!/bin/sh # -*- sh -*- : </dev/null | awk 'BEGIN { ev=1; } /^precision:/ { ev=0; } END { if (ev == 0) { print "yes";} else { print "no"; } exit ev; }' exit 0 fi if [ "$1" = "config" ]; then echo 'graph_title NTP kernel PLL precision' echo 'graph_args --alt-autoscale' echo 'graph_vlabel PLL precision' echo 'graph_category time' echo 'graph_info The precision of the kernel phase-locked loop used by NTP' echo 'ntp_pll_prec.label pll-precision' echo 'ntp_pll_prec.info Phase-locked loop precision in seconds' exit 0 fi CALL=`{ ntpq -c kerninfo; ntpdc -c kerninfo; } 2>/dev/null | awk '/^precision:/ { print $2 }'` printf "ntp_pll_prec.value %.23f" ${CALL} ; echo