#!/bin/sh # -*- sh -*- : </dev/null | awk 'BEGIN { ev=1; } /^frequency tolerance:/ { 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 frequency tolerance (ppm)' echo 'graph_args --alt-autoscale' echo 'graph_vlabel PLL frequency (ppm)' echo 'graph_category time' echo 'graph_info The frequency tolerance of the kernel phase-locked loop used by NTP' echo 'ntp_pll_tol.label pll-tolerance' echo 'ntp_pll_tol.info Phase-locked loop frequency tolerance in parts per million' exit 0 fi echo -n 'ntp_pll_tol.value ' { ntpq -c kerninfo; ntpdc -c kerninfo; } 2>/dev/null | awk '/^frequency tolerance:/ { print $3 }'