Source code pulled from OpenBSD for OpenNTPD. The place to contribute to this code is via the OpenBSD CVS tree.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

131 lines
2.9 KiB

20 years ago
20 years ago
20 years ago
  1. .\" $OpenBSD: ntpd.8,v 1.14 2005/06/21 19:55:18 deraadt Exp $
  2. .\"
  3. .\" Copyright (c) 2003, 2004 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 July 9, 2004
  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 dSs
  27. .Op Fl f Ar file
  28. .Ek
  29. .Sh DESCRIPTION
  30. The
  31. .Nm
  32. daemon synchronizes the local clock to one or more remote NTP servers,
  33. and can also act as an NTP server itself,
  34. redistributing the local time.
  35. It implements the Simple Network Time Protocol version 4,
  36. as described in RFC 2030,
  37. and the Network Time Protocol version 3,
  38. as described in RFC 1305.
  39. .Pp
  40. .Nm
  41. uses the
  42. .Xr adjtime 2
  43. system call to correct the local system time without causing time jumps.
  44. Adjustments larger than 128ms are logged using
  45. .Xr syslog 3 .
  46. The threshold value is chosen to avoid having local clock drift
  47. thrash the log files.
  48. Should
  49. .Nm
  50. be started with the
  51. .Fl d
  52. option, all calls to
  53. .Xr adjtime 2
  54. will be logged.
  55. .Pp
  56. .Nm
  57. is usually started at boot time, and can be enabled by
  58. setting the following in
  59. .Pa /etc/rc.conf.local :
  60. .Pp
  61. .Dl ntpd_flags=\&"\&"
  62. .Pp
  63. See
  64. .Xr rc 8
  65. and
  66. .Xr rc.conf 8
  67. for more information on the boot process
  68. and enabling daemons.
  69. .Pp
  70. When
  71. .Nm
  72. starts up, it reads settings from a configuration file,
  73. typically
  74. .Xr ntpd.conf 5 .
  75. .Pp
  76. The options are as follows:
  77. .Bl -tag -width "-f fileXXX"
  78. .It Fl d
  79. Do not daemonize.
  80. If this option is specified,
  81. .Nm
  82. will run in the foreground and log to
  83. .Em stderr .
  84. .It Fl f Ar file
  85. Use
  86. .Ar file
  87. as the configuration file,
  88. instead of the default
  89. .Pa /etc/ntpd.conf .
  90. .It Fl S
  91. Do not set the time immediately at startup.
  92. This is the default.
  93. .It Fl s
  94. Set the time immediately at startup if the local clock is off by more
  95. than 180 seconds.
  96. Allows for a large time correction,
  97. eliminating the need to run
  98. .Xr rdate 8
  99. before starting
  100. .Nm .
  101. .El
  102. .Sh FILES
  103. .Bl -tag -width "/etc/ntpd.confXXX" -compact
  104. .It Pa /etc/ntpd.conf
  105. default
  106. .Nm
  107. configuration file
  108. .El
  109. .Sh SEE ALSO
  110. .Xr date 1 ,
  111. .Xr adjtime 2 ,
  112. .Xr ntpd.conf 5 ,
  113. .Xr rc 8 ,
  114. .Xr rc.conf 8 ,
  115. .Xr rdate 8 ,
  116. .Xr timed 8
  117. .Rs
  118. .%R RFC 1305
  119. .%T "Network Time Protocol (Version 3)"
  120. .%D March 1992
  121. .Re
  122. .Rs
  123. .%R RFC 2030
  124. .%T "Simple Network Time Protocol (SNTP) Version 4"
  125. .%D October 1996
  126. .Re
  127. .Sh HISTORY
  128. The
  129. .Nm
  130. program first appeared in
  131. .Ox 3.6 .