components/ntp/manpages/ntpdate.8
author Rich Burridge <rich.burridge@oracle.com>
Fri, 23 Oct 2015 15:32:50 -0700
changeset 5007 0052258cbb9d
parent 433 components/ntp/manpages/ntpdate.1m@5de96cdbdfcb
permissions -rw-r--r--
PSARC 2015/428 Normalization of Solaris man page section numbers 22081831 Normalize cups man pages 22081902 Normalize ntp man pages 22081919 Normalize libdnet man pages 22081942 Normalize ptp man pages 22081959 Normalize snort man pages
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
172
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
     1
'\" te
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
     2
.\" CDDL HEADER START
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
     3
.\"
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
     4
.\" The contents of this file are subject to the terms of the
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
     5
.\" Common Development and Distribution License (the "License").
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
     6
.\" You may not use this file except in compliance with the License.
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
     7
.\"
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
     8
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
     9
.\" or http://www.opensolaris.org/os/licensing.
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    10
.\" See the License for the specific language governing permissions
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    11
.\" and limitations under the License.
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    12
.\"
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    13
.\" When distributing Covered Code, include this CDDL HEADER in each
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    14
.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    15
.\" If applicable, add the following below this CDDL HEADER, with the
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    16
.\" fields enclosed by brackets "[]" replaced with your own identifying
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    17
.\" information: Portions Copyright [yyyy] [name of copyright owner]
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    18
.\"
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    19
.\" CDDL HEADER END
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    20
.\"
5007
0052258cbb9d PSARC 2015/428 Normalization of Solaris man page section numbers
Rich Burridge <rich.burridge@oracle.com>
parents: 433
diff changeset
    21
.\" Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
172
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    22
.\"
5007
0052258cbb9d PSARC 2015/428 Normalization of Solaris man page section numbers
Rich Burridge <rich.burridge@oracle.com>
parents: 433
diff changeset
    23
.TH "ntpdate" "8" "" "" "System Administration Commands"
172
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    24
.SH NAME
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    25
ntpdate \- set the date and time with NTP
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    26
.SH SYNOPSIS
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    27
.LP
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    28
.B /usr/sbin/ntpdate
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    29
[\fB-46bBdqsuv\fR] [\fB-a\fR \fIkey\fR] [\fB-e\fR \fIAuthdelay\fR] [\fB-k\fR \fIkeyfile\fR] [\fB-o\fR \fIversion\fR] [\fB-p\fR \fIsamples\fR] [\fB-t\fR \fItimeout\fR] \fIserver\fR [ ... ]
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    30
.SH "OPTIONS"
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    31
.TP
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    32
.BR "-4"
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    33
Force DNS resolution of following host names on the command line to the IPv4 namespace.
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    34
.TP
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    35
.BR "-6"
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    36
Force DNS resolution of following host names on the command line to the IPv6 namespace.
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    37
.TP
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    38
.BR "-a \fIkey\fP"
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    39
Enable authentication and specify the key identifier to be used for authentication as the argument \fIkey\fR. The keys and key identifiers must match in both the client and server key files. The default is to disable authentication.
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    40
.TP
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    41
.BR "-B"
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    42
Force the time to always be slewed using the adjtime() system call, even if the measured offset is greater than 0.5 seconds. The default is to step the time using settimeofday() if the offset is greater than +-0.5s. Note that, if the offset is much greater than +-0.5s in this case, that it can take a long time (hours) to slew the clock to the correct value. During this time, the host should not be used to synchronize clients.
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    43
.TP
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    44
.BR "-b"
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    45
Force the time to be stepped using the settimeofday() system call, rather than slewed (default) using the adjtime() system call. This option should be used when called from a startup file at boot time.
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    46
.TP
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    47
.BR "-d "
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    48
Enable the debugging mode, in which \fBntpdate\fR will go through all the steps, but not adjust the local clock. Information useful for general debugging will also be printed.
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    49
.TP
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    50
.BR "-e \fIauthdelay\fP"
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    51
Specify the processing delay to perform an authentication function as the value \fIauthdelay\fR, in seconds and fraction (see \fBntpd\fR for details). This number is usually small enough to be negligible for most purposes, though specifying a value may improve timekeeping on very slow CPU's.
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    52
.TP
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    53
.BR "-k \fIkeyfile\fP"
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    54
Specify the path for the authentication key file as the string \fIkeyfile\fR. The default is \fB/etc/inet/ntp.keys\fR. This file should be in the format described in \fBntpd\fR.
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    55
.TP
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    56
.BR "-o \fIversion\fP"
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    57
Specify the NTP version for outgoing packets as the integer \fIversion\fR, which can be 1 or 2. The default is 3. This allows \fBntpdate\fR to be used with older NTP versions.
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    58
.TP
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    59
.BR "-p \fIsamples\fP"
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    60
Specify the number of samples to be acquired from each server as the integer \fIsamples\fR, with values from 1 to 8 inclusive. The default is 4.
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    61
.TP
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    62
.BR "-q"
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    63
Query only - don't set the clock.
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    64
.TP
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    65
.BR "-s"
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    66
Divert logging output from the standard output (default) to the system \fBsyslog\fR facility.
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    67
.TP
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    68
.BR "-t \fItimeout\fP"
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    69
Specify the maximum time waiting for a server response as the value \fItimeout\fR, in seconds and fraction. The value is is rounded to a multiple of 0.2 seconds. The default is 1 second, a value suitable for polling across a LAN.
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    70
.TP
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    71
.BR "-u"
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    72
Direct \fBntpdate\fR to use an unprivileged port or outgoing packets. This is most useful when behind a firewall that blocks incoming traffic to privileged ports, and you want to synchronise with hosts beyond the firewall. Note that the \fB-d\fR option always uses unprivileged ports.
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    73
.TP
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    74
.BR "-v"
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    75
Print \fBntpdate\fR's version identification string during program startup.
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    76
.SH "DESCRIPTION"
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    77
\fBntpdate\fR sets the local date and time by polling the Network Time Protocol (NTP) server(s) given as the \fIserver\fR arguments to determine the correct time. It must be run as root unless the \fB-d\fR or \fB-q\fR options are used. A number of samples are obtained from each of the servers specified and a subset of the NTP clock filter and selection algorithms are applied to select the best of these. Note that the accuracy and reliability of \fBntpdate\fR depends on the number of servers, the number of polls each time it is run and the interval between runs.
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    78
.LP
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    79
\fBntpdate\fR can be run manually as necessary to set the host clock, or it can be run from the host startup script to set the clock at boot time. It is also possible to run \fBntpdate\fR from a \fBcron\fR script. However, it is important to note that \fBntpdate\fR with contrived \fBcron\fR scripts is no substitute for the NTP daemon, which uses sophisticated algorithms to maximize accuracy and reliability while minimizing resource use. Finally, since \fBntpdate\fR does not discipline the host clock frequency as does \fBntpd\fR, the accuracy using \fBntpdate\fR is limited.
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    80
.LP
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    81
Time adjustments are made by \fBntpdate\fR in one of two ways. If \fBntpdate\fR determines the clock is in error more than 0.5 second it will simply step the time by calling the system \fBsettimeofday()\fR routine. If the error is less than 0.5 seconds, it will slew the time by calling the system \fBadjtime()\fR routine. The latter technique is less disruptive and more accurate when the error is small, and works quite well when \fBntpdate\fR is run by \fBcron\fR every hour or two.
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    82
\fBntpdate\fR will decline to set the date if an NTP server daemon (e.g., \fBntpd\fR) is running on the same host. When running \fBntpdate\fR on a regular basis from \fBcron\fR as an alternative to running a daemon, doing so once every hour or two will result in precise enough timekeeping to avoid stepping the clock.
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    83
Note that in contexts where a host name is expected, a \fB-4\fR qualifier preceding the host name forces DNS resolution to the IPv4 namespace, while a \fB-6\fR qualifier forces DNS resolution to the IPv6 namespace.
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    84
.PP
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    85
.SH NOTES
433
5de96cdbdfcb 7070651 NTP manpages have the wrong stability.
Brian Utterback <Brian.Utterback@Oracle.COM>
parents: 181
diff changeset
    86
Disclaimer: The functionality of this program is now available in the \fBntpd\fB program. See the \fB-q\fB command line option in the \fBntpd\fB - Network Time Protocol (NTP) daemon man page. The \fBntpdate\fB program is to be retired from this distribution.
172
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    87
.TE
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    88
.PP
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    89
.SH SEE ALSO
093198acf7d4 7018272 Move NTP to userland
Brian Utterback <Brian.Utterback@Oracle.COM>
parents:
diff changeset
    90
.LP
5007
0052258cbb9d PSARC 2015/428 Normalization of Solaris man page section numbers
Rich Burridge <rich.burridge@oracle.com>
parents: 433
diff changeset
    91
\fBntpd\fR(8), \fBntpdc\fR(8), \fBattributes\fR(7)