logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

ntpd.8 (3958B)


  1. .\" $OpenBSD: ntpd.8,v 1.45 2019/11/11 17:42:28 otto Exp $
  2. .\"
  3. .\" Copyright (c) 2003, 2004, 2006 Henning Brauer <henning@openbsd.org>
  4. .\"
  5. .\" Permission to use, copy, modify, and distribute this software for any
  6. .\" purpose with or without fee is hereby granted, provided that the above
  7. .\" copyright notice and this permission notice appear in all copies.
  8. .\"
  9. .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  10. .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  11. .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
  12. .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  13. .\" WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER IN
  14. .\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
  15. .\" OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  16. .\"
  17. .Dd $Mdocdate: November 11 2019 $
  18. .Dt NTPD 8
  19. .Os
  20. .Sh NAME
  21. .Nm ntpd
  22. .Nd Network Time Protocol daemon
  23. .Sh SYNOPSIS
  24. .Nm ntpd
  25. .Bk -words
  26. .Op Fl dnv
  27. .Op Fl f Ar file
  28. .Op Fl p Ar file
  29. .Ek
  30. .Sh DESCRIPTION
  31. The
  32. .Nm
  33. daemon synchronizes the local clock to one or more remote NTP servers
  34. or local timedelta sensors.
  35. .Nm
  36. can also act as an NTP server itself,
  37. redistributing the local time.
  38. It implements the Simple Network Time Protocol version 4,
  39. as described in RFC 5905,
  40. and the Network Time Protocol version 3,
  41. as described in RFC 1305.
  42. Time can also be fetched from TLS HTTPS servers to reduce the
  43. impact of unauthenticated NTP
  44. man-in-the-middle attacks.
  45. .Pp
  46. The options are as follows:
  47. .Bl -tag -width "-f fileXXX"
  48. .It Fl d
  49. Do not daemonize.
  50. If this option is specified,
  51. .Nm
  52. will run in the foreground and log to
  53. .Em stderr .
  54. .It Fl f Ar file
  55. Use
  56. .Ar file
  57. as the configuration file,
  58. instead of the default
  59. .Pa /etc/ntpd.conf .
  60. .It Fl n
  61. Configtest mode.
  62. Only check the configuration file for validity.
  63. .Pp
  64. .Nm
  65. will stay in the foreground for up to 15 seconds waiting for one of the
  66. configured NTP servers to reply.
  67. .It Fl v
  68. This option allows
  69. .Nm
  70. to send DEBUG priority messages to syslog.
  71. .It Fl p Ar file
  72. Write pid to
  73. .Ar file
  74. .El
  75. .Pp
  76. .Nm
  77. uses the
  78. .Xr adjtime 2
  79. system call to correct the local system time without causing time jumps.
  80. Adjustments of 32ms and greater are logged using
  81. .Xr syslog 3 .
  82. The threshold value is chosen to avoid having local clock drift
  83. thrash the log files.
  84. Should
  85. .Nm
  86. be started with the
  87. .Fl d
  88. or
  89. .Fl v
  90. option, all calls to
  91. .Xr adjtime 2
  92. will be logged.
  93. .Pp
  94. .Nm
  95. makes efforts to verify and correct the time at boot if constraints are
  96. configured and satisfied or if trusted servers or sensors return results,
  97. and if the clock is not being moved backwards.
  98. .Pp
  99. After the local clock is synchronized,
  100. .Nm
  101. adjusts the clock frequency using the
  102. .Xr adjfreq 2
  103. system call to compensate for systematic drift.
  104. .Pp
  105. .Nm
  106. is started at boot time by default via
  107. .Va ntpd_flags
  108. in
  109. .Pa /etc/rc.conf .
  110. See
  111. .Xr rc 8
  112. and
  113. .Xr rc.conf 8
  114. for more information on the boot process
  115. and enabling daemons.
  116. .Pp
  117. When
  118. .Nm
  119. starts up, it reads settings from its configuration file,
  120. typically
  121. .Xr ntpd.conf 5 ,
  122. and its initial clock drift from
  123. .Pa /var/db/ntpd.drift .
  124. Clock drift is periodically written to the drift file thereafter.
  125. .Sh FILES
  126. .Bl -tag -width "/var/db/ntpd.driftXXX" -compact
  127. .It Pa /etc/ntpd.conf
  128. Default configuration file.
  129. .It Pa /var/db/ntpd.drift
  130. Drift file.
  131. .It Pa /var/run/ntpd.sock
  132. Socket file for communication with
  133. .Xr ntpctl 8 .
  134. .El
  135. .Sh SEE ALSO
  136. .Xr date 1 ,
  137. .Xr adjfreq 2 ,
  138. .Xr adjtime 2 ,
  139. .Xr ntpd.conf 5 ,
  140. .Xr ntpctl 8 ,
  141. .Xr rc 8 ,
  142. .Xr rc.conf 8 ,
  143. .Xr rdate 8
  144. .Sh STANDARDS
  145. .Rs
  146. .%A David L. Mills
  147. .%D March 1992
  148. .%R RFC 1305
  149. .%T Network Time Protocol (Version 3): Specification, Implementation and Analysis
  150. .Re
  151. .Pp
  152. .Rs
  153. .%A David L. Mills
  154. .%A Jim Martin
  155. .%A Jack Burbank
  156. .%A William Kasch
  157. .%D June 2010
  158. .%R RFC 5905
  159. .%T Network Time Protocol Version 4: Protocol and Algorithms Specification
  160. .Re
  161. .Sh HISTORY
  162. The
  163. .Nm
  164. program first appeared in
  165. .Ox 3.6 .