📄 timed.8
字号:
.\" Copyright (c) 1980, 1991, 1993.\" The Regents of the University of California. All rights reserved..\".\" Redistribution and use in source and binary forms, with or without.\" modification, are permitted provided that the following conditions.\" are met:.\" 1. Redistributions of source code must retain the above copyright.\" notice, this list of conditions and the following disclaimer..\" 2. Redistributions in binary form must reproduce the above copyright.\" notice, this list of conditions and the following disclaimer in the.\" documentation and/or other materials provided with the distribution..\" 3. All advertising materials mentioning features or use of this software.\" must display the following acknowledgement:.\" This product includes software developed by the University of.\" California, Berkeley and its contributors..\" 4. Neither the name of the University nor the names of its contributors.\" may be used to endorse or promote products derived from this software.\" without specific prior written permission..\".\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION).\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF.\" SUCH DAMAGE..\".\" @(#)timed.8 8.1 (Berkeley) 6/6/93.\".Dd June 6, 1993.Dt TIMED 8.Os BSD 4.3.Sh NAME.Nm timed.Nd time server daemon.Sh SYNOPSIS.Nm timed.Op Fl M.Op Fl t.Op Fl d.Op Fl i Ar network.Op Fl n Ar network.Op Fl F Ar host1 host2 ....Sh DESCRIPTIONThisis a time server daemon and is normally invokedat boot time from the.Xr rc 8file. It synchronizes the host's time with the time of othermachines in a local area network running .Nm timed 8 .These time servers will slow down the clocks of some machinesand speed up the clocks of others to bring them to the average network time.The average network time is computed from measurements of clock differencesusing the.Tn ICMPtimestamp request message..PpThe service provided by.Nm timedis based on a master-slavescheme.When.Nm timed 8is started on a machine, it asks the master for the network timeand sets the host's clock to that time.After that, it accepts synchronization messages periodically sent bythe master and calls .Xr adjtime 2to perform the needed corrections on the host's clock..PpIt also communicates with.Xr date 1in order to set the date globally,and with .Xr timedc 8 ,a timed control program.If the machine running the master crashes, then the slaves will electa new master from among slaves running with the .Fl Mflag.A.Nm timedrunning without the.Fl Mor.Fl Fflags will remain a slave.The .Fl tflag enables.Nm timedto trace the messages it receives in thefile.Pa /var/log/timed.log .Tracing can be turned on or off by the program.Xr timedc 8 .The.Fl dflag is for debugging the daemon.It causes the program to not put itself into the background.Normally.Nm timedchecks for a master time server on each network to whichit is connected, except as modified by the options described below.It will request synchronization service from the first master serverlocated.If permitted by the.Fl Mflag, it will provide synchronization service on any attached networkson which no current master server was detected.Such a server propagates the time computed by the top-level master.The .Fl nflag, followed by the name of a network which the host is connected to(see.Xr networks 5 ) ,overrides the default choice of thenetwork addresses made by the program.Each time the.Fl nflag appears, that network name is added to a list of valid networks.All other networks are ignored.The .Fl iflag, followed by the name of a network to which the host is connected(see.Xr networks 5 ) ,overrides the default choice of the network addresses made by the program.Each time the.Fl iflag appears, that network name is added to a list of networks to ignore.All other networks are used by the time daemon.The.Fl nand .Fl iflags are meaningless if used together..Pp.Nm Timedchecks for a master time server on each network to whichit is connected, except as modified by the.Fl nand.Fl ioptions described above.If it finds masters on more than one network, it chooses one networkon which to be a "slave," and then periodically checks the othernetworks to see if the masters there have disappeared..PpOne way to synchronize a group of machines is to use an NTP daemon to synchronize the clock of one machine to a distant standard or a radioreceiver and .Fl F Ar hostnameto tell its timed daemon to trust only itself..PpMessages printed by the kernel on the system console occur withinterrupts disabled. This means that the clock stops while they are printing.A machine with many disk or network hardware problems and consequentmessages cannot keep good time by itself. Each message typically causesthe clock to lose a dozen milliseconds. A time daemon cancorrect the result..PpMessages in the system log about machines that failed to respondusually indicate machines that crashed or were turned off.Complaints about machines that failed to respond to initial timesettings are often associated with "multi-homed" machinesthat looked for time masters on more than one network and eventuallychose to become a slave on the other network..SH WARNINGIf two or more time daemons, whether .Nm timed ,.Xr NTP ,try to adjust the same clock, temporal chaos will result.If both .Nmand another time daemon are run on the same machine,ensure that the .Fl Fflag is used, so that .Nm timednever attempts to adjust the local clock..Pp The protocol is based on UDP/IP broadcasts. All machines withinthe range of a broadcast that are using the TSP protocol must cooperate.There cannot be more than a single administrative domain using the.Fl Fflag among all machines reached by a broadcast packet.Failure to follow this rule is usually indicated by complaints concerning"untrusted" machines in the system log..Sh FILES.Bl -tag -width /var/log/timed.masterlog -compact.It Pa /var/log/timed.logtracing file for timed.It Pa /var/log/timed.masterloglog file for master timed .El.Sh SEE ALSO.Xr date 1 ,.Xr adjtime 2 ,.Xr gettimeofday 2 ,.Xr icmp 4 ,.Xr timedc 8 ,.Rs.%T "TSP: The Time Synchronization Protocol for UNIX 4.3BSD".%A R. Gusella.%A S. Zatti.Re.Sh HISTORYThe.Nmdaemon appeared in.Bx 4.3 .
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -