Projet

Général

Profil

Paste
Télécharger au format
Statistiques
| Branche: | Révision:

root / plugins / ntp / ntp_kernel_pll_tol @ 17f78427

Historique | Voir | Annoter | Télécharger (1,23 ko)

1 ae557903 azet
#!/bin/sh
2
# -*- sh -*-
3
4
: <<EOF
5
6
=head1 NAME
7
8
ntp_kernel_pll_tol - Plugin to monitor the kernel's PLL frequency tolerance for
9
the NTP status
10
11
=head1 CONFIGURATION
12
13
No configuration
14
15
=head1 AUTHORS
16
17 fba800ae Veres Lajos
Original authors unknown
18 ae557903 azet
ntp_kernel_pll_freq script patched by azet@azet.org for frequency tolerance support
19
20
=head1 LICENSE
21
22
Unknown license
23
24
=head1 BUGS
25
26
None known
27
28
=head1 MAGIC MARKERS
29
30
 #%# family=auto
31
 #%# capabilities=autoconf
32
33
=cut
34
35
EOF
36
37
if [ "$1" = "autoconf" ]; then
38 17f78427 Lars Kruse
    { ntpq -c kerninfo; ntpdc -c kerninfo; } 2>/dev/null |
39 ae557903 azet
    awk 'BEGIN { ev=1; }
40 17f78427 Lars Kruse
         /^frequency tolerance:/ { ev=0; }
41 ae557903 azet
         END { if (ev == 0) { print "yes";} else { print "no"; } exit ev; }'
42
    exit 0
43
fi
44
45
if [ "$1" = "config" ]; then
46
    echo 'graph_title NTP kernel PLL frequency tolerance (ppm)'
47
    echo 'graph_args --alt-autoscale'
48
    echo 'graph_vlabel PLL frequency (ppm)'
49
    echo 'graph_category time'
50
    echo 'graph_info The frequency tolerance of the kernel phase-locked loop used by NTP'
51
    echo 'ntp_pll_tol.label pll-tolerance'
52
    echo 'ntp_pll_tol.info Phase-locked loop frequency tolerance in parts per million'
53
    exit 0
54
fi
55
56
echo -n 'ntp_pll_tol.value '
57
{ ntpq -c kerninfo; ntpdc -c kerninfo; } 2>/dev/null | awk '/^frequency tolerance:/ { print $3 }'