ntp_clock - Reference Clock Options



The NTP Version 4 daemon supports some three dozen different radio, satellite and modem reference clocks plus a special pseudo-clock used for backup or when no other clock source is available. Detailed descriptions of individual device drivers and options can be found in the Reference Clock Drivers page. Additional information can be found in the pages linked there, including the Debugging Hints for Reference Clock Drivers and How To Write a Reference Clock Driver pages. In addition, support for a PPS signal is available as described in Pulse-per-second (PPS) Signal Interfacing page. Many drivers support special line discipline/streams modules which can significantly improve the accuracy using the driver. These are described in the Line Disciplines and Streams Drivers page.

A reference clock will generally (though not always) be a radio timecode receiver which is synchronized to a source of standard time such as the services offered by the NRC in Canada and NIST and USNO in the US. The interface between the computer and the timecode receiver is device dependent, but is usually a serial port. A device driver specific to each reference clock must be selected and compiled in the distribution; however, most common radio, satellite and modem clocks are included by default. Note that an attempt to configure a reference clock when the driver has not been compiled or the hardware port has not been appropriately configured results in a scalding remark to the system log file, but is otherwise non hazardous.

For the purposes of configuration, ntpd treats reference clocks in a manner analogous to normal NTP peers as much as possible. Reference clocks are identified by a syntactically correct but invalid IP address, in order to distinguish them from normal NTP peers. Reference clock addresses are of the form 127.127.t.u, where t is an integer denoting the clock type and u indicates the unit number in the range 0-3. While it may seem overkill, it is in fact sometimes useful to configure multiple reference clocks of the same type, in which case the unit numbers must be unique.

The server command is used to configure a reference clock, where the address argument in that command is the clock address. The key, version and ttl options are not used for reference clock support. The mode option is added for reference clock support, as described below. The prefer option can be useful to persuade the server to cherish a reference clock with somewhat more enthusiasm than other reference clocks or peers. Further information on this option can be found in the Mitigation Rules and the prefer Keyword page. The minpoll and maxpoll options have meaning only for selected clock drivers. See the individual clock driver document pages for additional information.

The fudge command is used to provide additional information for individual clock drivers and normally follows immediately after the server command. The address argument specifies the clock address. The refid and stratum options control can be used to override the defaults for the device. There are two optional device-dependent time offsets and four flags that can be included in the fudge command as well.

The stratum number of a reference clock is by default zero. Since the ntpd daemon adds one to the stratum of each peer, a primary server ordinarily displays an external stratum of one. In order to provide engineered backups, it is often useful to specify the reference clock stratum as greater than zero. The stratum option is used for this purpose. Also, in cases involving both a reference clock and a pulse-per-second (PPS) discipline signal, it is useful to specify the reference clock identifier as other than the default, depending on the driver. The refid option is used for this purpose. Except where noted, these options apply to all clock drivers.


server 127.127.t.u [prefer] [mode int] [minpoll int] [maxpoll int]

This command can be used to configure reference clocks in special ways. The options are interpreted as follows:


Marks the reference clock as preferred. All other things being equal, this host will be chosen for synchronization among a set of correctly operating hosts. See the Mitigation Rules and the prefer Keyword page for further information.

mode int

Specifies a mode number which is interpreted in a device-specific fashion. For instance, it selects a dialing protocol in the ACTS driver and a device subtype in the parse drivers.

minpoll int

These options specify the minimum and maximum polling interval for reference clock messages in seconds, interpreted as dual logarithms (2 ^ x). For most directly connected reference clocks, both minpoll and maxpoll default to 6 (2^16 = 64 s). For modem reference clocks, minpoll defaults to 10 (2^10 = 1024 s = 17.1 m) and maxpoll defaults to 14 (2^14 = 16384 s = 4.5 h). The allowable range is 4 (16 s) to 17 (36.4 h) inclusive.

fudge 127.127.t.u [time1 sec] [time2 sec] [stratum int] [refid string]
int] [flag1 0|1] [flag2 0|1] [flag3 0|1] [flag4 0|1]

This command can be used to configure reference clocks in special ways. It must immediately follow the server command which configures the driver. Note that the same capability is possible at run time using the ntpdc program. The options are interpreted as follows:

Specifies a constant to be added to the time offset produced by the driver, a fixed-point decimal number in seconds. This is used as a calibration constant to adjust the nominal time offset of a particular clock to agree with an external standard, such as a precision PPS signal. It also provides a way to correct a systematic error or bias due to serial port or operating system latencies, different cable lengths or receiver internal delay. The specified offset is in addition to the propagation delay provided by other means, such as internal DIPswitches. Where a calibration for an individual system and driver is available, an approximate correction is noted in the driver documentation pages. Note: in order to facilitate calibration when more than one radio clock or PPS signal is supported, a special calibration feature is available. It takes the form of an argument to the enable command described in the Miscellaneous Options page and operates as described in the Reference Clock Drivers page.

time2 secs

Specifies a fixed-point decimal number in seconds, which is interpreted in a driver-dependent way. See the descriptions of specific drivers in the reference clock drivers page.

stratum int

Specifies the stratum number assigned to the driver, an integer between 0 and 15. This number overrides the default stratum number ordinarily assigned by the driver itself, usually zero.

refid string

Specifies an ASCII string of from one to four characters which defines the reference identifier used by the driver. This string overrides the default identifier ordinarily assigned by the driver itself.

mode int

Specifies a mode number which is interpreted in a device-specific fashion. For instance, it selects a dialing protocol in the ACTS driver and a device subtype in the parse drivers.

flag1 flag2 flag3 flag4

These four flags are used for customizing the clock driver. The interpretation of these values, and whether they are used at all, is a function of the particular clock driver. However, by convention flag4 is used to enable recording monitoring data to the clockstats file configured with the filegen command. Further information on the filegen command can be found in the Monitoring Options page.



Primary source of documentation: /usr/share/doc/ntp-*

This file was automatically generated from HTML source.

More Linux Commands

LWP::MemberMixin(3pm) - Member access mixin class (ManPage)
A mixin class to get methods that provide easy access to member variables in the %$self. Ideally there should be better Perl language support for this. There is

libnetcfg(1) - configure libnet (Commands - Linux man page)
The libnetcfg utility can be used to configure the libnet. Starting from perl 5.8 libnet is part of the standard Perl distribution, but the libnetcfg can be use

glEvalCoord(3gl) - evaluate enabled one- and two-dimensional
glEvalCoord1 evaluates enabled one-dimensional maps at argument u. glEvalCoord2 does the same for two-dimensional maps using two domain values, u and v. To defi

ruby.ruby2.1(1) Interpreted object-oriented scripting langua
Ruby is an interpreted scripting language for quick and easy object-oriented programming. It has many features to process text files and to do system management

discard(8) - Postfix discard mail delivery agent (Man Page)
The Postfix discard(8) delivery agent processes delivery requests from the queue manager. Each request specifies a queue file, a sender address, a next-hop dest

curses(3ncurses) CRT screen handling and optimization packag
curses.3ncurses - The ncurses library routines give the user a terminal-independent method of updating character screens with reasonable optimization. This impl

erfc(3) - complementary error function - Linux manual page
The erfc() function returns the complementary error function of x, that is, 1.0 - erf(x). RETURN VALUE On success, these functions return the complementary erro

getutxent(3) - access utmp file entries - Linux manual page
New applications should use the POSIX.1-specified utmpx versions of these functions; see CONFORMING TO. utmpname() sets the name of the utmp-format file for the

XwcTextListToTextProperty(3) - convert text lists and text p
The XmbTextListToTextProperty, XwcTextListToTextProperty and Xutf8TextListToTextProperty functions set the specified XTextProperty value to a set of null-separa

SDL_GL_SetAttribute(3) - Set a special SDL/OpenGL attribute
Sets the OpenGL attribute attr to value. The attributes you set dont take effect until after a call to SDL_SetVideoMode. You should use SDL_GL_GetAttribute to c

testsolv(1) run a libsolv testcase through the solver.......
The testsolv tools can be used to run a testcase. Testcases can either be manually created to test specific features, or they can be written by libsolvs testcas

Tcl_FSConvertToPathType(3) - procedures to interact with any
There are several reasons for calling the Tcl_FS API functions (e.g. Tcl_FSAccess and Tcl_FSStat) rather than calling system level functions like access and sta

We can't live, work or learn in freedom unless the software we use is free.