📄 ntpd.8
字号:
.\" $Header: /xtel/isode/isode/others/ntp/RCS/ntpd.8,v 9.0 1992/06/16 12:42:48 isode Rel $.\".\" $Log: ntpd.8,v $.\" Revision 9.0 1992/06/16 12:42:48 isode.\" Release 8.0.\".\".TH NTPD 8 "15 June 1989".SH NAMEntpd \- time synchronization daemon implementing NTP.SH SYNOPSIS.B /usr/local/etc/ntpd[-a threshold] [-c file] [-d] [-D level] [-l] [-n] [-s] [-t] [-p port].SH OPTIONS.B -a .I thresholdis used to set the threshold which limits how far .B ntpdwill change the system clock. Its used as a sort of ultimate sanity check toprevent your system time from being changed a great deal. By default, thethreshold is 1000 seconds. .I thresholdis to be specified in units of seconds, or the string.B anyto defeat the sanity check..PP.B -c .I config-filecan be used to specify the location of the.I ntpdconfiguration file. By default, /etc/ntp.conf is used..PP.B -dwill bump the debug level by one. May be specified more than once toincrement debuglevel by one each time. Has no effect if .I ntpdhas not been compiled with .B DEBUGdefined..PP.B -D.I levelwill set the debug level to the value specified..PP.B -lwill cause.I ntpdto log a message each time the logical clock is changed. Normally, you wouldnot specify this option unless you wanted to gather statistical informationto analyze the logical clock behavior. If the.B -l option is specified, a message will be logged approximately every 2 minutes..PP.B -nwill, on Ultrix systems, inhibit the.I ntpdprogram from being swapped. This is a desirable thing to do when in thediskless workstation environment..PP.B -swill cause.I ntpdto.B neveradjust the the local clock..PP.B -twill cause.I ntpdto modify the value of.I tickadjin your kernel. This will have no effect unless .I ntpdwas compiled with.B SETTICKADJdefined. This is an ugly thing to do, and idealy you should set the valueof.B tickadjin your kernel configuration to the correct value..PP.B -pwill specify a UDP port to use for ntp. This will override the default..PP.SH DESCRIPTION.I NTPDis the network time synchronization daemon and is normally invoked at boot time from the.IR /etc/rc (8)file. It implements a new revision of the.B Network Time Protocolfirst described in RFC-958.It maintains the host's time synchronized with a set of distributed time servers, each with varying accurracy and reliability. Multiple time servermasters may exist, but there is no requirement for election of a singlemaster. .PP.I Ntpduses the.IR adjtime (2)system call to slew the clock of the host by small amount in order to keep theclock synchronized. If the local clock exceeds the ``correct'' time by somethreshold, then .IR settimeofday (2)is used to make a step adjustment of the local clock..PPWhen.IR ntpd (8)is started on the machine, it reads configuration information from.I /etc/ntpd.confwhich contains information about other .I ntptime servers and host specific information. Configuration information islisted one entry per line, with fields separated by whitespace. Lines which begin with a ``#'' character are treated as comments. Here is a sampleconfiguration file:.in +2m.nf## 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**-10precision -7#tickadj 5#peer INET:foo.umd.edupeer INET:192.5.39.94peer OSI:Internet=foo.bar.edupeer OSI:Janet=000021000018+PID+03030101server INET:bogon.umd.edupassive INET:bozo.umd.edu## Configure a reference clock. # device refid stratum precision type# ------- ----- ------- --------- ----refclock /dev/tty03 WWV 1 -5 psti# refclock /dev/null LOCL 1 -5 local.DT.fi.PPThere are two major types of information specified in theconfiguration file: local host information, and remote timer serverspecification. The local host information is used to describe theintrinsic properties of the local host's timekeeping machinary, suchas .B precisionand.BR tickadj .The remote time server specifications give details of the ntp clientsand server to synchronise with..PPThe possible configuration file options are as follows:-.PP.TP.B precisiona number which describes the resolution of the local clock, as a powerof two. For example, a .I VAXsystem typically has a 100 HZ clock and thus a .I precision of -7. If the symbol.B _hzis defined in the namelist of /vmunix, this value is automatically set basedon the value of hz..TP.B tickadjis used to specify the granularity of clock adjustment done by the.IR adjtime(2)system call. If the .B \-toption is specified when ntpd is invoked, the kernel variable _tickadj ismodified via.IR /dev/kmem.The preferred method of setting .B tickadjis by changing the value in the kernel file.I conf.cinstead of having ntpd set in this rude fashion. On a VAX, a value of1 is usually used. See the README file for typical values of.B tickadjon various hardware platforms..TP.B driftfilecan be used to specify the name of the file that the drift compensationregister will be loaded from at initialization time and that updated valueswill be written into. The drift compensation value describes the intrinsicdrift of your host's clock. By default, the file.B /etc/ntp.driftwill be used..TP.B peer.TP.B passive.TP.B serverCurrently three time server specifications are supported. Each command takes an address. If the address starts with the letters.I OSI:then it is assumed to be an OSI address, .I INET:implies internet addressing and neither prefix currently defaults tointernet. Each host specified in any one of the three commands iselligable to be synchronized to, while random hosts which set up apeer relationship are not. The.B peerand.B servercommands create an active polling situation; in the case of .B peer,the NTP packets are sourced in .I Symmetric-Activemode, while using.B servercauses the packets to be in.I Clientmode. When reachability is lost with a configured host in either of thesetwo cases, the daemon will continue to poll to re-acquire that host.A host specified in the.B passivecommand 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 ifreachability is lost..brIt is recommended that the bulk of the peers configured should be specifiedwith the.I clientkeyword; this will minimize resource usage on the remote NTP server. If yourhost will be serving as a redistribution point for a cluster of hosts, youshould set up.I peerrelationships with higher quality clocks (lower stratums) and other equalstratum clocks. In other words, if you are not redistributing time toothers, you shouldn't need to configure any.I peersin your NTP configuration;.I clientspecifications are more appropriate..TP.B refclockTo configure a .B referenceclock, you should use something like the example above. The firstfield after the.B refclockkeyword is the name of the file that the clock is connected to. This must bea complete path name with a leading.B /character. The next field is the .I reference-idthat will be inserted into the packets generated from this NTP daemon. Fora PSTI clock, this should be.B WWV.The next field is the .B stratumof the clock. Actually, it is really the stratum that will be placed in the packet if this clock is selected by thelocal NTP daemon as the reference clock. Following that is the .B precisionthat will be inserted into the packet when this clock is selected. Thefinal field is the.B typeof the clock. Currently, two types are supported:.B pstifor the Precision Standard Time, Inc WWV clock (RIP) and.B localfor the local time of the system. The.B localtype of clock can be used to declare one host in an isolated network ashaving the "correct" time and then the other hosts on that network cansynchronized to it..brThe reference clock feature is new and will probably be enhanced in the future..TP.B maxpeerssets the maximum number of peers allowed (currently not used)..TP.B trustingallows clocks not mentioned in your configuration file to be eligle tosynchronise your clock if they appear suitable..TP.B osilistenThis is an OSI address specification that.I ntpd listens on for incoming connections..TP.B logclocksets the variable which logs all clock changes..TP.B driftfilespecifies the localtion of the drift file (defaults to .IR /etc/ntp.drift )..TP.B waytoobig.TP.B setthresholdeither of these sets a variable which is the maximum clock change thatwill be considered. Setting this to.I anyallows any change. Otherwise this value should be a floating pointnumber..TP.B debuglevelAnother way to set the debug level..TP.B settickadjthis specifies whether to set the kernels tickadj parameter if required..TP.B noswapOn machines that support it (ultrix) this will allow the process to belocked in memory, which helps..TP .B broadcastthis specifies an interface which will allow broadcast mode ntp actions..TP.B logfileThis specifies a log file that will receive the tracing and monitoringoutput of the ntp daemon..TP.B priorityThe priority for the.I ntpdprocess to run at (defaults to -10)..SH NOTES.B Please choose your NTP peers carefully; .B send mail to.IR ntp@TRANTOR.UMD.EDU.B for assitance..SH BUGSNo doubt..SH FILES.nf/etc/ntp.conf NTP daemon configuration file.fi.SH "SEE ALSO"adjtime(2), settimeofday(2), RFC-958, .I Network Time Protocol (Version 2) Specification and Implementation, .I Revised 15 April 1988,David L. Mills, University of Delaware.SH "AUTHORS"Original Code.brLouis A. Mamakos,.I louie@TRANTOR.UMD.EDU.brMichael G. Petry,.I petry@TRANTOR.UMD.EDU.brThe University of Maryland, Computer Science Center..spOSI support and various gratuitous changes.brJulian Onions,.I jpo@cs.nott.ac.uk.brNottingham University
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -