ntp.1
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 1 代码 · 共 214 行
1
214 行
.TH ntp 1.SH Namentp \- query a clock running the Network Time Protocol daemon, ntpd.SH Syntax.B /usr/etc/ntp [.B \-v][.B \-s][.B \-f].I host1 \fR|\fP IPaddress1 ....SH Description.NXR "ntp command"The .PN ntpcommand is used to determine the offset betweenthe local clock and a remote clock. It canalso be used to set the local host's time toa remote host's time. The .PN ntpcommand sends an NTP packet to the NTP daemon,.PN ntpd ,running on each of the remote hosts specified on the command line. The remote hosts must be running .PN ntpd .When the .PN ntpddaemon on the remote host receives the NTP packet, it fills in the fields (as specified inRFC 1129), and sends the packet back. The .PN ntpcommand then formats and printsthe results on the standard output. .NTYou can specify hosts by either host name or Internetaddress. The hosts that you specify must either existin the.PN /etc/hostsfile, or in the master.PN hostsdatabase, if the database is being served to yoursystem by BIND/Hesiod or Yellow Pages..NEThe default output shows the roundtrip delay of the NTP packet in seconds, the estimated offset between the local timeand remote time in seconds, and the date in .PN ctime format. See the .MS ctime 3reference page for more information..PPThe.PN \-sand.PN \-foptions can be used to reset the time of the local clock. Use.PN ntpwith these options to initialize the system time prior to running the.PN ntpddaemon. .SH Options.IP \-v 5Specifies verbose output. The output shows the full contents of the received NTP packets, plus the calculated offset and delay..IP \-s 5Sets local clock to remote time. This only happens if theoffset between the local and remote time is less than 1000 seconds. The local clock is not reset if the remote host is unsynchronized. .IPIf you specify more than one host name on the command line, .PN ntpqueries each host in order, waiting for each host to answeror timeout before querying the next host. The local clock is set to the timeof the first remote host that responds..IP \-f 5Forces setting local clock regardless of offset. The.PN \-f option must be used with .PN \-s option. The local clock is not reset if the remotehost is unsynchronized..SH RestrictionsUsing the .PN \-sand .PN \-foptions require that you be logged on as superuser..SH ExamplesThe following is the default output to an.PN ntpquery about a remote host with an internet address of 555.5.55.5:.NXR "ntp command" "sample output".EX# \f(CB/usr/etc/ntp 555.5.55.5\f(CW555.5.55.5: delay:1.845207 offset:-0.358460 Mon Mar 20 08:05:44 1989.EE.PPThe following is the verbose output to an .PN ntp query about the same remote host:.EX# \f(CB/usr/etc/ntp \-v 555.5.55.5\f(CWPacket from: [555.5.55.5]Leap 0, version 1, mode Server, poll 6, precision \-10 stratum 1 (WWVB)Synch Distance is 0000.1999 0.099991Synch Dispersion is 0000.0000 0.000000Reference Timestamp is a7bea6c3.88b40000 Tue Mar 7 14:06:43 1989Originate Timestamp is a7bea6d7.d7e6e652 Tue Mar 7 14:07:03 1989Receive Timestamp is a7bea6d7.cf1a0000 Tue Mar 7 14:07:03 1989Transmit Timestamp is a7bea6d8.0ccc0000 Tue Mar 7 14:07:04 1989Input Timestamp is a7bea6d8.1a77e5ea Tue Mar 7 14:07:04 1989555.5.55.5: delay:0.019028 offset:-0.043890 Tue Mar 7 14:07:04 1989.EE.PPThe fields are interpreted as follows:.IP "Packet from: [\fIinternet address\fP]" 5The address of the remote host from which this NTP packet was received..IP "Leap \fIn\fP" 5The leap second indicator. Non-zero if there is to be aleap second inserted in the NTP timescale. The bits areset before 23:59 on the day of insertion and reset after00:00 on the following day..IP "version \fIn\fP"The NTP protocol version..IP "mode \fItype\fP"The NTP mode can be Server, Client, Symmetric Passive,Symmetric Active, or Broadcast. See RFC 1129 for more informationon NTP modes..IP "Poll \fIx\fP" 5The desired poll rate of the peer in seconds as a power of 2.For example, if poll is equal to6, that means that the poll rate is one message exchanged every 2**6 seconds..IP "Precision \fIx\fP" 5The precision of the remote host's clock in seconds as a power of 2. For example, if precision is equal to\-10, that means that the precision is 2**\-10. The .PN ntpddaemon sets this automatically..IP "Stratum \fIn\fP (\fIsource\fP)" 5The stratum of the clock in the NTP hierarchy, along withthe source of the clock. The \fIsource\fP is either the name of a referencestandard (such as WWVB or GOES), or the Internet address ofthe clock that this clock references..IP "Synch Distance is \fInn.nn nn.nn\fP" 5The values reported are used internally by .PN ntpd ..IP "Synch Dispersion is \fInn.nn nn.nn\fP" 5The values reported are used internally by.PN ntpd ..PPThe next five timestamps are given as NTP fixed-point values, inboth hexadecimal and .PN ctime .The timestamps are set either by this NTP process, or by the remote host youare querying. These timestamps are used by the local host to calculatedelay and offset for this query..IP "Reference Timestamp is \fIhex-timestamp ctime_string\fP"This specifies the last time the remote host clock was adjusted.(remote time).IP "Originate Timestamp is \fIhex-timestamp ctime_string\fP"This specifies when the NTP request was transmitted by thelocal host to the remote host. (local time).IP "Receive Timestamp is \fIhex-timestamp ctime_string\fP"This specifies when the NTP request was received at the remotehost. (remote time).IP "Transmit Timestamp is \fIhex-timestamp ctime_string\fP"This specifies when the NTP response was transmitted by the remote host. (remote time).IP "Input Timestamp is \fIhex-timestamp ctime_string\fP" 5This specifies when the NTP response was received by the local host.(local time).IP "\fIhostname\fP: delay:\fItime\fP offset:\fItime\fP" 5This field summarizes the results of the query, giving the host name orinternetaddress of the responding clock specified in the command line, the round-trip delay in seconds, and the offset between the two clocks in seconds (assuming symmetric round-trip times). .SH DiagnosticsThe following error messages can be returned by NTP:.TP 20\f(CW*Timeout*\fP.TP 20\fIhostname\fP \f(CWis not responding\fPMay indicate that the .PN ntpddaemon is not running on the remote host..TP 20\f(CWNo such host: \fIhostname\fPThe.PN ntpddaemon cannot resolve the specified host namein the.PN /etc/hostsfile. Check that the hostexists in the.PN /etc/hostsfile, or that it exists in the master.PN hostsdatabase, if the database is being served to your systemby BIND/Hesiod or Yellow Pages..SH See Alsoctime(3), ntp.conf(5), ntpd(8), ntpdc(8).br\fIRFC 1129\(emInternet time synchronization: The Network Time Protocol\fP.br\fIGuide to System and Network Setup\fP.br\fIIntroduction to Networking and Distributed System Services\fP
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?