NTPD(8) Clockwatcher's Programming Manual NTPD(8) NAME ntpd - time synchronization daemon implementing NTP SYNOPSIS ntpd [-d] [-s] [-t] OPTIONS -d will bump the debug level by one. May be specified more than once to increment debug level by one each time. Has no effect if _n_t_p_d has not been compiled with DEBUG defined. -s will cause _n_t_p_d to not adjust the the local clock. -t will cause _n_t_p_d to modify the value of _t_i_c_k_a_d_j in your kernel. This will have no effect unless _n_t_p_d was compiled with SETTICKADJ defined. DESCRIPTION _N_T_P_D is the network time synchronization daemon and is nor- mally invoked at boot time from the /_e_t_c/_r_c(8) file. It implements a new revision of the Network Time Protocol first described in RFC-958. It maintains the host's time syn- chronized with a set of distributed time servers, each with varying accurracy and reliability. Multiple time server masters may exist, but there is no requirement for election of a single master. _N_t_p_d uses the _a_d_j_t_i_m_e(2) system call to slew the clock of the host by small amount in order to keep the clock syn- chronized. If the local clock exceeds the ``correct'' time by some threshold, then _s_e_t_t_i_m_e_o_f_d_a_y(2) is used to make a step adjustment of the local clock. When _n_t_p_d(8) is started on the machine, it reads configura- tion information from /_e_t_c/_n_t_p._c_o_n_f which contains informa- tion about other _n_t_p time servers and host specific informa- tion. Configuration information is listed one entry per line, with fields separated by whitespace. Lines which 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 # # intrinsic drift of local clock # Printed 4/11/100 27 November 1996 1 NTPD(8) Clockwatcher's Programming Manual NTPD(8) tickadj 1 # # Peers Type Name # peer foo.umd.edu peer 192.5.39.94 peer bar.arpa server bogon.umd.edu passive bozo.umd.edu There are two major types of information specified in the configuration file: local host information, and remote timer server specification. The local host information is used to describe the intrinsic properties of the local host's time- keeping machinary. The commands in this group are preci- sion, and tickadj. The precision command takes a number which describes the resolution of the local clock, as a power of two. For exam- ple, a _V_A_X system typically has a 100 HZ clock and thus a _p_r_e_c_i_s_i_o_n of -7. If the symbol _hz is defined in the namel- ist of /vmunix, 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 _a_d_j_t_i_m_e(_2) system call. If the -s option is specified when ntpd is invoked, the kernel variable _tickadj is modified via /_d_e_v/_k_m_e_m. The preferred method of setting tickadj is by changing the value in the kernel file _c_o_n_f._c instead of having ntpd set in this rude fashion. On a VAX, a value of 1 is usually used. See the README file for typical values of tickadj on various hardware platforms. Currently three timer 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 elligable 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 _S_y_m_m_e_t_r_i_c-_A_c_t_i_v_e mode, while using server causes the packets to be in _C_l_i_e_n_t 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 eligable as to be synchronized but will not be polled if reachability is lost. Printed 4/11/100 27 November 1996 2 NTPD(8) Clockwatcher's Programming Manual NTPD(8) It is recommended that the bulk of the peers configured should be specified with the _c_l_i_e_n_t 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 _p_e_e_r 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 _p_e_e_r_s in your NTP configuration; _c_l_i_e_n_t specifications are more appropri- ate. NOTES Please choose your NTP peers carefully; send mail to _n_t_p@_T_R_A_N_T_O_R._U_M_D._E_D_U for assitance. There exists a broadcast command which will exercise com- pletely untested code. Use at your own risk. There is no reason to believe that the hpux code which was added still works. In general, this code and adaptations of the NTPD to platforms without the _a_d_j_t_i_m_e(_2) system call are not likely to be very satisfying. BUGS No doubt. FILES /etc/ntp.conf NTP daemon configuration file SEE ALSO adjtime(2), settimeofday(2), RFC-958, _N_e_t_w_o_r_k _T_i_m_e _P_r_o_t_o_c_o_l (_V_e_r_s_i_o_n _1) _S_p_e_c_i_f_i_c_a_t_i_o_n _R_e_v_i_s_e_d _1_7 _S_e_p_t_e_m_b_e_r _1_9_8_8 AUTHORS Louis A. Mamakos, _l_o_u_i_e@_T_R_A_N_T_O_R._U_M_D._E_D_U Michael G. Petry, _p_e_t_r_y@_T_R_A_N_T_O_R._U_M_D._E_D_U The University of Maryland, Computer Science Center. Printed 4/11/100 27 November 1996 3