summaryrefslogtreecommitdiffstats
path: root/web/attachments/119417-check_ntp-diff
diff options
context:
space:
mode:
Diffstat (limited to 'web/attachments/119417-check_ntp-diff')
-rw-r--r--web/attachments/119417-check_ntp-diff68
1 files changed, 68 insertions, 0 deletions
diff --git a/web/attachments/119417-check_ntp-diff b/web/attachments/119417-check_ntp-diff
new file mode 100644
index 0000000..11d424d
--- /dev/null
+++ b/web/attachments/119417-check_ntp-diff
@@ -0,0 +1,68 @@
110,19c10
2< # $Id: check_ntp.pl,v 1.30 2005/02/09 11:15 mevertse Exp $
3< #
4< # (c) 2005 Merijn Evertse, SARA Computing and Networking Services
5< # 9-2-2005, 11:15
6< #
7< # Modified the script to accept parameters -4, -6 to choose between the ipv4 and ipv6 protocol.
8< # When no parameter is specified ipv4 is chosen as the default.
9< #
10< # (c) 2004 Matthew Kent
11< # 19-11-2004, 04:00
12---
13> # $Id: check_ntp.pl,v 1.20 2004/11/19 03:59:43 mattkent Exp $
1473,74c64,65
15< use vars qw($opt_V $opt_h $opt_H $opt_t $opt_w $opt_c $opt_j $opt_k $verbose $PROGNAME $def_jitter $ipv4 $ipv6);
16< use lib utils.pm;
17---
18> use vars qw($opt_V $opt_h $opt_H $opt_t $opt_w $opt_c $opt_j $opt_k $verbose $PROGNAME $def_jitter);
19> use lib utils.pm;
2097,99c88
21< "v" => \$verbose, "verbose" => \$verbose,
22< "4" => \$ipv4, "use-ipv4" => \$ipv4,
23< "6" => \$ipv6, "use-ipv6" => \$ipv6,
24---
25> "v" => \$verbose, "verbose" => \$verbose,
26191,206d179
27< # Determine protocol te be used for ntpdate and ntpq
28< my $ntpdate;
29< my $ntpq;
30< if ($ipv4) {
31< $ntpdate = $utils::PATH_TO_NTPDATE . " -4";
32< $ntpq = $utils::PATH_TO_NTPQ . " -4";
33< }
34< elsif ($ipv6) {
35< $ntpdate = $utils::PATH_TO_NTPDATE . " -6";
36< $ntpq = $utils::PATH_TO_NTPQ . " -6";
37< }
38< else {
39< # Use IPv4 as the default value
40< $ntpdate = $utils::PATH_TO_NTPDATE . " -4";
41< $ntpq = $utils::PATH_TO_NTPQ . " -4";
42< }
43214c187
44< if (!open (NTPDATE, $ntpdate . " -q $host 2>&1 |")) {
45---
46> if (!open (NTPDATE, "$utils::PATH_TO_NTPDATE -q $host 2>&1 |")) {
47289c262
48< if ( open(NTPQ, $ntpq . " -np $host 2>&1 |") ) {
49---
50> if ( open(NTPQ,"$utils::PATH_TO_NTPQ -np $host 2>&1 |") ) {
51439c412
52< print "Usage: $PROGNAME -H <host> [-46] [-w <warn>] [-c <crit>] [-j <warn>] [-k <crit>] [-v verbose]\n";
53---
54> print "Usage: $PROGNAME -H <host> [-w <warn>] [-c <crit>] [-j <warn>] [-k <crit>] [-v verbose]\n";
55457c430
56< Clock jitter in milliseconds at which a warning message will be generated.\n Defaults to $DEFAULT_JITTER_CRIT.
57---
58> Clock jitter in milliseconds at which a warning message will be generated.\n Defaults to $DEFAULT_JITTER_CRIT.\n
59460,465c433,434
60< warning is returned.\n
61< -4 (--use-ipv4)
62< Use IPv4 connection
63< -6 (--use-ipv6)
64< Use IPv6 connection
65< \n";
66---
67> warning is returned.
68> ";