Annotation of embedaddon/ntp/sntp/sntp.1, revision 1.1
1.1 ! misho 1: .TH SNTP 1 2011-12-24 "( 4.2.6p5)" "Programmer's Manual"
! 2: .\" EDIT THIS FILE WITH CAUTION (sntp.1)
! 3: .\"
! 4: .\" It has been AutoGen-ed December 24, 2011 at 06:33:59 PM by AutoGen 5.12
! 5: .\" From the definitions sntp-opts.def
! 6: .\" and the template file agman1.tpl
! 7: .\"
! 8: .SH NAME
! 9: sntp \- standard Simple Network Time Protocol program
! 10: .SH SYNOPSIS
! 11: .B sntp
! 12: .\" Mixture of short (flag) options and long options
! 13: .RB [ \-\fIflag\fP " [\fIvalue\fP]]... [" \--\fIopt-name\fP " [[=| ]\fIvalue\fP]]..."
! 14: .br
! 15: .in +8
! 16: [ hostname-or-IP ...]
! 17: .PP
! 18:
! 19: .SH "DESCRIPTION"
! 20: This manual page briefly documents the \fBsntp\fP command.
! 21: .I sntp
! 22: can be used as a SNTP client to query a NTP or SNTP server and either display
! 23: the time or set the local system's time (given suitable privilege). It can be
! 24: run as an interactive command or in a
! 25: .I cron
! 26: job.
! 27:
! 28: NTP (the Network Time Protocol) and SNTP (the Simple Network Time Protocol)
! 29: are defined and described by RFC 5905.
! 30:
! 31: .PP
! 32: The default is to write the estimated correct local date and time (i.e. not
! 33: UTC) to the standard output in a format like
! 34: .BR "'1996-10-15 20:17:25.123 (+0800) +4.567 +/- 0.089 secs'" ,
! 35: where the
! 36: .B "'(+0800)'"
! 37: means that to get to UTC from the reported local time one must
! 38: add 8 hours and 0 minutes,
! 39: and the
! 40: .B "'+4.567 +/- 0.089 secs'"
! 41: indicates the local clock is 4.567 seconds behind the correct time
! 42: (so 4.567 seconds must be added to the local clock to get it to be correct),
! 43: and the time of
! 44: '1996-10-15 20:17:25.123'
! 45: is believed to be correct to within
! 46: +/- 0.089
! 47: seconds.
! 48: .SH OPTIONS
! 49: .TP
! 50: .BR \-4 ", " \--ipv4
! 51: Force IPv4 DNS name resolution.
! 52: This option must not appear in combination with any of the following options:
! 53: ipv6.
! 54: .sp
! 55: Force DNS resolution of the following host names on the command line
! 56: to the IPv4 namespace.
! 57: .TP
! 58: .BR \-6 ", " \--ipv6
! 59: Force IPv6 DNS name resolution.
! 60: This option must not appear in combination with any of the following options:
! 61: ipv4.
! 62: .sp
! 63: Force DNS resolution of the following host names on the command line
! 64: to the IPv6 namespace.
! 65: .TP
! 66: .BR \-d ", " \--normalverbose
! 67: Normal verbose.
! 68: .sp
! 69: Diagnostic messages for non-fatal errors and a limited amount of
! 70: tracing should be written to standard error. Fatal ones always
! 71: produce a diagnostic. This option should be set when there is a
! 72: suspected problem with the server, network or the source.
! 73: .TP
! 74: .BR \-K " \fIfile-name\fP, " \--kod "=" \fIfile-name\fP
! 75: KoD history filename.
! 76: .sp
! 77: Specifies the filename to be used to persist the history of KoD
! 78: responses received from servers. The default is
! 79: /var/db/ntp-kod.
! 80: .TP
! 81: .BR \-p ", " \--syslog
! 82: Logging with syslog.
! 83: This option must not appear in combination with any of the following options:
! 84: logfile.
! 85: .sp
! 86: When this option is set all logging will be done using syslog.
! 87: .TP
! 88: .BR \-l " \fIfile-name\fP, " \--logfile "=" \fIfile-name\fP
! 89: Log to specified logfile.
! 90: This option must not appear in combination with any of the following options:
! 91: syslog.
! 92: .sp
! 93: This option causes the client to write log messages to the specified
! 94: logfile.
! 95: .TP
! 96: .BR \-s ", " \--settod
! 97: Set (step) the time with settimeofday().
! 98: This option must not appear in combination with any of the following options:
! 99: adjtime.
! 100: .sp
! 101:
! 102: .TP
! 103: .BR \-j ", " \--adjtime
! 104: Set (slew) the time with adjtime().
! 105: This option must not appear in combination with any of the following options:
! 106: settod.
! 107: .sp
! 108:
! 109: .TP
! 110: .BR \-b " \fIbroadcast-address\fP, " \--broadcast "=" \fIbroadcast-address\fP
! 111: Use broadcasts to the address specified for synchronisation.
! 112: .sp
! 113: If specified SNTP will listen to the specified broadcast address
! 114: for NTP broadcasts. The default maximum wait time,
! 115: 68 seconds, can be modified with \-t.
! 116: .TP
! 117: .BR \-t " \fIseconds\fP, " \--timeout "=" \fIseconds\fP
! 118: Specify the number of seconds to wait for broadcasts.
! 119: This option takes an integer number as its argument.
! 120: The default \fIseconds\fP for this option is:
! 121: .ti +4
! 122: 68
! 123: .sp
! 124: When waiting for a broadcast packet SNTP will wait the number
! 125: of seconds specified before giving up. Default 68 seconds.
! 126: .TP
! 127: .BR \-a " \fIauth-keynumber\fP, " \--authentication "=" \fIauth-keynumber\fP
! 128: Enable authentication with the key auth-keynumber.
! 129: This option takes an integer number as its argument.
! 130: .sp
! 131: This option enables authentication using the key specified in this option's argument.
! 132: The argument of this option is the keyid, a number specified in the keyfile as this
! 133: key's identifier. See the keyfile option (-k) for more details.
! 134: .TP
! 135: .BR \-k " \fIfile-name\fP, " \--keyfile "=" \fIfile-name\fP
! 136: Specify a keyfile. SNTP will look in this file for the key specified with \-a.
! 137: .sp
! 138: This option specifies the keyfile. SNTP will search for the key specified with \-a keyno in this
! 139: file. Key files follow the following format:
! 140:
! 141: keyid keytype key
! 142:
! 143: Where keyid is a number identifying this key
! 144: keytype is one of the follow:
! 145: S Key in 64 Bit hexadecimal number as specified in in the DES specification.
! 146: N Key in 64 Bit hexadecimal number as specified in the NTP standard.
! 147: A Key in a 1-to-8 character ASCII string.
! 148: M Key in a 1-to-8 character ASCII string using the MD5 authentication scheme.
! 149:
! 150: For more information see ntp.keys(5).
! 151: .TP
! 152: .BR \-? , " \--help"
! 153: Display extended usage information and exit.
! 154: .TP
! 155: .BR \-! , " \--more-help"
! 156: Extended usage information passed thru pager.
! 157: .TP
! 158: .BR \-> " [\fIrcfile\fP]," " \--save-opts" "[=\fIrcfile\fP]"
! 159: Save the option state to \fIrcfile\fP. The default is the \fIlast\fP
! 160: configuration file listed in the \fBOPTION PRESETS\fP section, below.
! 161: .TP
! 162: .BR \-< " \fIrcfile\fP," " \--load-opts" "=\fIrcfile\fP," " \--no-load-opts"
! 163: Load options from \fIrcfile\fP.
! 164: The \fIno-load-opts\fP form will disable the loading
! 165: of earlier RC/INI files. \fI--no-load-opts\fP is handled early,
! 166: out of order.
! 167: .TP
! 168: .BR \- " [{\fIv|c|n\fP}]," " \--version" "[=\fI{v|c|n}\fP]"
! 169: Output version of program and exit. The default mode is `v', a simple
! 170: version. The `c' mode will print copyright information and `n' will
! 171: print the full copyright notice.
! 172: .SH OPTION PRESETS
! 173: Any option that is not marked as \fInot presettable\fP may be preset
! 174: by loading values from configuration ("RC" or ".INI") file(s) and values from
! 175: environment variables named:
! 176: .nf
! 177: \fBSNTP_<option-name>\fP or \fBSNTP\fP
! 178: .fi
! 179: .ad
! 180: The environmental presets take precedence (are processed later than)
! 181: the configuration files.
! 182: The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
! 183: If any of these are directories, then the file \fI.ntprc\fP
! 184: is searched for within those directories.
! 185: .SH USAGE
! 186: The simplest use of this program is as an unprivileged command to check the
! 187: current time and error in the local clock. For example:
! 188: .IP
! 189: .B sntp ntpserver.somewhere
! 190: .PP
! 191: With suitable privilege, it can be run as a command or in a
! 192: .I cron
! 193: job to reset the local clock from a reliable server, like the
! 194: .I ntpdate
! 195: and
! 196: .I rdate
! 197: commands. For example:
! 198: .IP
! 199: .B sntp \-a ntpserver.somewhere
! 200: .SH RETURN VALUE
! 201: The program returns a zero exit
! 202: status for success, and a non-zero one otherwise.
! 203: .SH BUGS
! 204: Please report bugs to http://bugs.ntp.org .
! 205: .SH AUTHOR
! 206: David L. Mills and/or others
! 207: .br
! 208: Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
! 209:
! 210: .PP
! 211: .nf
! 212: .na
! 213: see html/copyright.html
! 214:
! 215: .fi
! 216: .ad
! 217: .PP
! 218: This manual page was \fIAutoGen\fP-erated from the \fBsntp\fP
! 219: option definitions.
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>