summaryrefslogtreecommitdiff
path: root/sysutils/munin-node/files/node/node.d/ntp_kernel_err.in
blob: 0a28bfa615ec1b42a78fb7caa2e2c716b21512bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#! /bin/sh
#
# $Id: ntp_kernel_err.in,v 1.1.1.1 2006/06/04 20:53:57 he Exp $
#
# Plugin to monitor the estimated error for the kernel NTP
# status.
#
# Usage: Link or copy into /etc/munin/node.d/
#
# Magic markers (optional - only used by munin-config and some
# installation scripts):
#
#%# family=manual
#%# capabilities=autoconf

# If run with the "autoconf"-parameter, give our opinion on wether we
# should be run on this system or not. This is optinal, and only used by
# munin-config. In the case of this plugin, we should most probably
# always be included.

if [ "$1" = "autoconf" ]; then
    if ntpdc -c help >/dev/null 2>&1; then
	echo yes
	exit 0
    else
	echo no
	exit 1
    fi
fi

if [ "$1" = "config" ]; then
    echo 'graph_title NTP kernel PLL estimated error (secs)'
#    echo 'graph_args --logarithmic'
    echo 'graph_vlabel est. err (secs)'
    echo 'graph_category other'
    echo 'graph_info The kernels estimated error for the phase-locked loop used by NTP'
    echo 'ntp_err.label est-error'
    echo 'ntp_err.info Estimated error for the kernel PLL'
    exit 0
fi

echo -n 'ntp_err.value '
ntpdc -c kern | awk '/^estimated error:/ { print $3 }'