Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Sep 1999 09:40:03 -0700 (PDT)
From:      cjc@scitec.com
To:        freebsd-doc@freebsd.org
Subject:   Re: docs/11978: timed(8) manpage does not define '-F' switch
Message-ID:  <199909221640.JAA78359@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR docs/11978; it has been noted by GNATS.

From: cjc@scitec.com
To: fishy@hotbot.com (Nick Sanders)
Cc: freebsd-gnats-submit@freebsd.org, cjc@scitec.com
Subject: Re: docs/11978: timed(8) manpage does not define '-F' switch
Date: Wed, 22 Sep 1999 12:38:34 -0400 (EDT)

 --ELM938018314-5916-0_
 Content-Type: text/plain; charset=US-ASCII
 Content-Transfer-Encoding: 7bit
 
 Nick Sanders wrote,
 > I'm pleased to announce that I have finished work on a new version of
 > timed.8 which incorporates both a new layout and numerous
 > language/spelling/error improvements, including the incorporation of the
 > -F flag.
 > 
 > The candidate that I submit for inclusion into FreeBSD is located at:
 > http://u2.netgate.net/~fishy/freebsd/timedcan.8
 > 
 > 
 > A diff between the candidate and the reorganized version which I
 > submitted to gnats earlier is located at:
 > http://u2.netgate.net/~fishy/freebsd/timediff.8
 > 
 > 
 > A diff between the candidate and the original version (which is
 > currently in FreeBSD) is located at:
 > http://u2.netgate.net/~fishy/freebsd/timediffo.8
 > 
 > 
 > Feedback is always appreciated :).
 
 I looked it over and I like the changes. However, I think the summary
 of the flags should be at the top (like most (good) manpages have
 it). 
 
 Also, when rearranging, it becomes very clear that one paragraph in
 the orignal page is repeated in content. I cut it out.
 
 While I was rearranging that, I tried my hand at some
 language/clarity/style fixes too.
 
 However, there is one technical point that really needs to be
 settled. Does the '-F' switch always imply '-M' even if the localhost
 is not one of the arguments of '-F?' I _know_ that if I run a machine
 with the following,
 
 # timed -F timehost
 
 Where timehost != localhost, that the machine _will_ act as a master
 on other networks to which it is connected.
 
 Spacing and some other things got rearranged by emacs while editing,
 so the diffs are pretty confusing. My whole new version is a MIME
 attachment.
 -- 
 Crist J. Clark                              cjc@scitec.com
 SciTec, Inc
 
 --ELM938018314-5916-0_
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Disposition: attachment; filename=timed.8.new
 Content-Description: timed.8.new
 Content-Transfer-Encoding: 7bit
 
 .\" 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 DESCRIPTION
 .Nm
 is a time server daemon normally invoked at boot time from the
 .Xr rc 8
 files.  
 It synchronizes the host's time with the time of other machines in a 
 local area network which are also running 
 .Nm Ns .
 The time servers will slow down or speed up the clocks of their
 respective machines 
 to bring them all to the average network time.  The average network time
 is computed from measurements of clock differences using the
 .Tn ICMP
 timestamp request message.
 .Pp
 The following options are available:
 .Bl -tag -width indent
 .It Fl M
 Indicates that this machine may become a 
 .Nm
 master if necesary.
 .It Fl t
 Flag enables 
 .Nm
 to trace the messages it receives in the file 
 .It Pa /var/log/timed.log .
 Tracing can be turned on or off during run-time by the program 
 .Xr timedc 8 .
 .It Fl d
 Flag is for debugging the daemon.  It causes the program to not put itself into the background.
 .It Fl i
 Each time this flag appears, the network name following (see 
 .Xr networks 5
 ) will be added to a list of networks to ingore. All other networks
 to which the machine is connected are used by the time daemon.
 .It Fl n
 Each time this flag appears the network name (see 
 .Xr networks 5
 ) is added to a list of valid networks. All other networks are ignored.
 .It Fl F
 Used to create a list of trusted hosts.  
 .Nm
 will only accept trusted hosts as masters, and if it finds an untrusted host claiming to be master,
 .Nm
 will suppress incoming messages from that host and call for a new election.  
 .El
 .Pp
 The 
 .Fl n 
 and 
 .Fl i 
 flags are meaningless if used together.  Both flags require that their
 arguments are actual networks to which the machine is connected. 
 .Pp
 A 
 .Nm
 running without the 
 .Fl M 
 or 
 .Fl F 
 flags will always remain a slave.  
 .Pp
 If the 
 .Fl F 
 flag is not used, 
 .Nm
 will treat all machines as trustworthy.
 .Pp
 The service provided by
 .Nm
 is based on a master-slave scheme.  When
 .Nm
 is started on a machine, it asks the master for the network time and
 sets the host's clock to that time.  After that, it accepts
 synchronization messages periodically sent by the master and calls
 .Xr adjtime 2
 to perform the needed corrections on the host's clock.
 .Pp
 It also communicates with
 .Xr date 1
 in order to set the date globally, and with 
 .Xr timedc 8 ,
 a 
 .Nm
 control program.  If the 
 .Nm
 master cannot be reached, then
 the slaves will elect a new master from among slaves running with the 
 .Fl M
 or
 .Fl F
 flag.
 .Pp
 Normally at startup
 .Nm
 checks for a master time server on each network to which it is
 connected, except as modified by the 
 .Fl n
 and
 .Fl i
 options described above.  It will
 request synchronization service from the first master server located.
 If permitted by the
 .Fl M
 or 
 .Fl F
 flag, it will provide synchronization service on any attached networks
 on which no trusted master server was detected.  Such a server
 propagates the time computed by the top-level master.
 .Nm
 will periodically check back to see if that master has disappeared.  
 If it finds that there are no trusted masters, it will begin the
 election process on that network.
 .Sh NOTES
 .Pp
 One way to synchronize a group of machines is to use an
 .Tn NTP
 daemon to synchronize the clock of one machine to a distant standard or a radio receiver and 
 .Fl F Ar localhost
 to tell its 
 .Nm
 daemon to trust only itself.  This way, 
 .Nm timed 
 will always consider itself to be a master, and will not adjust the local
 clock settings (which would undo the changes made by the 
 .Tn NTP
 daemon).
 .Pp
 Messages printed by the kernel on the system console occur with interrupts disabled. This means that 
 the clock stops while they are printing.  A machine with many disk or network hardware problems and 
 consequent messages cannot keep good time by itself.  Each message typically causes the clock to lose 
 a dozen milliseconds.  A time daemon can correct the result.
 .Pp
 Messages in the system log about machines that failed to respond usually indicate machines that crashed 
 or were turned off.  Complaints about machines that failed to respond to initial time settings are often 
 associated with "multi-homed" machines that looked for time masters on more than one network and eventually
 chose to become a slave on the other network.
 .Sh WARNINGS
 If two or more time daemons, whether 
 .Nm
 or another 
 .Tn NTP
 daemon, try to adjust the same clock, temporal chaos will result.
 If both 
 .Nm
 and another time daemon are run on the same machine,
 ensure that a 
 .Fl F
 flag listing only the local machine is used, so that 
 .Nm
 never attempts to adjust the local clock.
 .Pp 
 The protocol is based on
 .Tn UDP/IP
 broadcasts.  All machines within the range of a broadcast that are using the
 .Tn TSP
 protocol must cooperate.  There cannot be more than a single administrative domain using the
 .Fl F
 flag 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.log
 tracing file for 
 .Nm
 .It Pa /var/log/timed.masterlog
 log file for master 
 .Nm
 .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 HISTORY
 The
 .Nm
 daemon appeared in
 .Bx 4.3 .
 
 --ELM938018314-5916-0_--
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199909221640.JAA78359>