5 # Plugin to monitor the kernel's PLL frequency for the NTP
8 # Usage: Link or copy into /etc/munin/node.d/
10 # Magic markers (optional - only used by munin-config and some
11 # installation scripts):
14 #%# capabilities=autoconf
16 # If run with the "autoconf"-parameter, give our opinion on wether we
17 # should be run on this system or not. This is optinal, and only used by
18 # munin-config. In the case of this plugin, we should most probably
21 if [ "$1" = "autoconf" ]; then
22 if ntpdc -c help >/dev/null 2>&1; then
31 if [ -f @@CONFDIR@@/ntp-freq-comp ]; then
32 fcomp=`cat @@CONFDIR@@/ntp-freq-comp`
37 if [ "$1" = "config" ]; then
38 echo 'graph_title NTP kernel PLL frequency (ppm +' ${fcomp}')'
39 # echo 'graph-args --logarithmic'
40 echo 'graph_args --alt-autoscale'
41 echo 'graph_vlabel PLL frequency (ppm +' ${fcomp}')'
42 echo 'graph_category other'
43 echo 'graph_info The frequency for the kernel phase-locked loop used by NTP'
44 echo 'ntp_pll_freq.label pll-freq'
45 echo 'ntp_pll_freq.info Phase-locked loop frequency in parts per million'
49 echo -n 'ntp_pll_freq.value '
50 ntpdc -c kern | awk -v fcomp=$fcomp '/^pll frequency:/ { print $3 + fcomp }'