Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ntpd(1M) — Interactive 3.2r4.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

adjtime(3I)

settimeofday(3I)

ntpd(1M)  —  

NAME

ntpd − time synchronization daemon implementing ntp

SYNOPSIS

/etc/ntpd [ −a threshold ] [ −c file ] [ −d ] [ −D level ] [ −l ] [ −n ] [ −s ]

DESCRIPTION

ntpd is the network time synchronization daemon and is normally invoked at boot time from the /etc/rc3.d/S05hbtcp file.  It implements the revision of the Network Time Protocol described in RFC1119.  It maintains the host’s time synchronized with a set of distributed time servers, each with varying accuracy and reliability.  Multiple time server masters may exist, but there is no requirement for election of a single master. 

The ntpd daemon uses the adjtime(3I) system call to slew the clock of the host by small amount in order to keep the clock synchronized.  If the local clock exceeds the “correct” time by some threshold, then settimeofday(3I) is used to make a step adjustment of the local clock.

When ntpd(1M) is started on the machine, it reads configuration information from /etc/ntpd.conf, which contains information about other ntp time servers and host specific information.  Configuration information is listed one entry per line, with fields separated by white space.  Lines that begin with a “#” character are treated as comments.  Here is a sample configuration file:

#
# Local clock parameters
#
#Precision of the local clock to the nearest power of 2
#ex.
#                       60-HZ   = 2**−6
#                       100-HZ  = 2**−7
#                       1000-HZ = 2**−10
precision −7
#

peerfoo.umd.edu
peer192.5.39.94
peerbar.arpa
serverbogon.umd.edu
passivebozo.umd.edu
#
# Configure a reference clock.

#devicerefidstratumprecisiontype
#---------------------------------------
peer/dev/tty03WWV1−5 psti

There are two major types of information specified in the configuration file: local host information and remote time server specification.  The local host information is used to describe the intrinsic properties of the local host’s timekeeping machinery.  The commands in this group are precision and tickadj.

The precision command takes a number which describes the resolution of the local clock, as a power of two.  For example, a VAX or 386 system typically has a 100 HZ clock and thus a precision of −7.  If the symbol “hz” is defined in the name list of /unix, this value is automatically set based on the value of HZ. 

The tickadj command is used to specify the granularity of clock adjustment done by the adjtime(3I) system call.  This should not be done on a 386/486 system.

The driftfile command can be used to specify the name of the file that the drift compensation register will be loaded from at initialization time and that updated values will be written into.  The drift compensation value describes the intrinsic drift of your host’s clock.  By default, the file /etc/ntp.drift will be used. 

Currently three time-server specifications are supported.  They are peer, server, and passive. Each command takes either a dotted-quad internet address or a host name. Each host specified in any one of the three commands is eligible to be synchronized to, while random hosts which set up a peer relationship are not. The peer and server commands create an active polling situation; in the case of peer, the ntp packets are sourced in Symmetric-Active mode, while using server causes the packets to be in Client mode.  When reachability is lost with a configured host in either of these two cases, the daemon will continue to poll to re-acquire that host.  A host specified in the passive command will not continue to be polled.  If that host begins to poll us, it will be eligible for synchronization but will not be polled if reachability is lost. 

It is recommended that the bulk of the peers configured should be specified with the server keyword; this will minimize resource usage on the remote ntp server.  If your host will be serving as a redistribution point for a cluster of hosts,  you should set up peer relationships with higher quality clocks (lower stratums) and other equal stratum clocks.  In other words, if you are not redistributing time to others, you shouldn’t need to configure any peers in your ntp configuration; client specifications are more appropriate. 

To configure a reference clock, you should use something like the example above.  The first field after the peer keyword is the name of the file that the clock is connected to.  This must be a complete path name with a leading slash (/) character.  The next field is the reference ID that will be inserted into the packets generated from this ntp daemon.  For a PSTI clock, this should be WWV.  The next field is the stratum of the clock.  Actually, it is really the stratum that will be placed in the packet if this clock is selected by the local ntp daemon as the reference clock.  Following that is the precision that will be inserted into the packet when this clock is selected.  The final field is the type of the clock.  Currently, two types are supported: psti for the Precision Standard Time, Inc. WWV clock (RIP) and local for the local time of the system.  The local type of clock can be used to declare one host in an isolated network as having the “correct” time and then the other hosts on that network can be synchronized to it. 

The reference clock feature is new and will probably be enhanced in the future. 

The following options are available:

−a threshold
Used to set the threshold which limits how far ntpd will change the system clock.  It’s used as a sort of ultimate sanity check to prevent your system time from being changed a great deal.  By default, the threshold is 1000 seconds.  threshold is to be specified in units of seconds, or the string any to defeat the sanity check. 

−c file
Used to specify the location of the ntpd configuration file.  By default /etc/ntp.conf is used. 

−d Bumps the debug level by one.  May be specified more than once to increment debug level by one each time. 

−D level
Sets the debug level to the value specified.

−l Causes ntpd to log a message each time the logical clock is changed.  Normally, you would not specify this option unless you wanted to gather statistical information to analyze the logical clock behavior.  If the −l option is specified, a message will be logged approximately every 2 minutes. 

−n Sets the no swap option on the process to prevent ntpd from being swapped or paged out. 

−s Causes ntpd to never adjust the local clock. 

FILES

/etc/ntp.conf       ntp daemon configuration file

SEE ALSO

adjtime(3I), settimeofday(3I). 
RFC1119 Network Time Protocol. 

WARNING

ntpd(1M) will only work on INTERACTIVE UNIX System Version 2.3 or later. 

CREDITS

This facility was developed by the University of Maryland. 
 
 
 

\*U  —  Version 1.0

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026