moved to external

This commit is contained in:
christos 2010-12-14 03:07:07 +00:00
parent ae5edec954
commit 89d498aa24
25 changed files with 0 additions and 3151 deletions

View File

@ -1,13 +0,0 @@
# $NetBSD: Makefile,v 1.9 2007/01/20 16:50:29 kardel Exp $
.include <bsd.own.mk>
SUBDIR= libopts libisc libntp libparse .WAIT
SUBDIR+= ntpd ntpdate ntpdc ntpq ntptime
SUBDIR+= ntptrace html
.if (${MKCRYPTO} != "no")
SUBDIR+= ntp-keygen
.endif
.include <bsd.subdir.mk>

View File

@ -1,54 +0,0 @@
# $NetBSD: Makefile.inc,v 1.20 2009/04/22 15:23:06 lukem Exp $
.if !defined(NTP_MAKEFILE_INC)
WARNS?= 1 # XXX -Wcast-qual -Wshadow -Wsign-compare
NTP_MAKEFILE_INC=1
.include <bsd.own.mk>
USE_FORT?= yes # network client/server
DIST= ${NETBSDSRCDIR}/dist/ntp
NTP_HTMLDIR= ${DIST}/html
CPPFLAGS+= -I${.CURDIR}/../include -I${DIST}/include -I${DIST}/libopts -DHAVE_CONFIG_H
.if (${MKCRYPTO} != "no")
CPPFLAGS+= -DOPENSSL
.endif
.if (${USE_INET6} != "no")
CPPFLAGS+= -DWANT_IPV6
.else
CPPFLAGS+= -DISC_PLATFORM_NEEDIN6ADDRANY
.endif
.if defined(PROG)
LIBNTP!= cd ${.CURDIR}/../libntp && ${PRINTOBJDIR}
LIBISC!= cd ${.CURDIR}/../libisc && ${PRINTOBJDIR}
LIBOPTS!= cd ${.CURDIR}/../libopts && ${PRINTOBJDIR}
LDADD+= -L${LIBNTP} -lntp -L${LIBOPTS} -lopts
DPADD+= ${LIBNTP}/libntp.a ${LIBOPTS}/libopts.a
.if (${MKCRYPTO} != "no")
LDADD+= -lcrypto -lcrypt
DPADD+= ${LIBCRYPTO} ${LIBCRYPT}
.endif
SRCS+= version.c
CLEANFILES+=version.c version.o
version.c: ${LIBNTP}/libntp.a ${.CURDIR}/../scripts/mkver
${_MKTARGET_CREATE}
${HOST_SH} ${.CURDIR}/../scripts/mkver ${PROG} > /dev/null
.endif # defined(PROG)
NTPSRCDIR?= ${PROG}
.PATH: ${DIST}/${NTPSRCDIR}
.if exists(${.CURDIR}/../../Makefile.inc)
.include "${.CURDIR}/../../Makefile.inc"
.endif
.endif # !defined(NTP_MAKEFILE_INC)

View File

@ -1,74 +0,0 @@
# $NetBSD: Makefile,v 1.6 2007/01/20 16:50:30 kardel Exp $
.include <bsd.own.mk>
.include "${.CURDIR}/../Makefile.inc"
.PATH: ${NTP_HTMLDIR}
.if ${MKDOC} != "no"
NTP_DOCFILES= accopt.html assoc.html audio.html authopt.html \
clockopt.html confopt.html \
build/scripts/footer.txt build/scripts/links10.txt \
build/scripts/links11.txt build/scripts/links12.txt \
build/scripts/links7.txt build/scripts/links8.txt \
build/scripts/links9.txt build/scripts/style.css \
build/patches.html build/build.html \
build/config.html build/hints.html \
build/porting.html build/quick.html \
copyright.html debug.html drivers/driver1.html \
drivers/driver10.html drivers/driver11.html drivers/driver12.html \
drivers/driver16.html drivers/driver18.html drivers/driver19.html \
drivers/driver2.html drivers/driver20.html drivers/driver22.html \
drivers/driver26.html drivers/driver27.html drivers/driver28.html \
drivers/driver29.html drivers/driver3.html drivers/driver30.html \
drivers/driver31.html drivers/driver32.html drivers/driver33.html \
drivers/driver34.html drivers/driver35.html drivers/driver36.html \
drivers/driver37.html drivers/driver38.html drivers/driver39.html \
drivers/driver4.html drivers/driver40.html drivers/driver42.html \
drivers/driver43.html drivers/driver44.html drivers/driver5.html \
drivers/driver6.html drivers/driver7.html drivers/driver8.html \
drivers/driver9.html drivers/icons/home.gif drivers/icons/mail2.gif \
drivers/oncore-shmem.html drivers/scripts/footer.txt \
drivers/scripts/style.css drivers/tf582_4.html extern.html \
gadget.html groups.html howto.html \
icons/home.gif icons/mail2.gif index.html \
kern.html keygen.html ldisc.html \
manyopt.html measure.html miscopt.html \
monopt.html msyslog.html mx4200data.html \
notes.html ntp_conf.html ntpd.html \
ntpdate.html ntpdc.html ntpdsim.html \
ntpdsim_new.html ntpq.html ntptime.html \
ntptrace.html parsedata.html parsenew.html \
pps.html \
prefer.html rdebug.html refclock.html \
release.html scripts/footer.txt scripts/links10.txt \
scripts/links11.txt scripts/links12.txt scripts/links7.txt \
scripts/links8.txt scripts/links9.txt scripts/style.css \
sntp.html tickadj.html
.for F in ${NTP_DOCFILES:O:u}
_FDIR:= ntp/${F:H} # subdir
_FDIR:= ${_FDIR:S,/.$,,} # remove trivial directory
_FNAME:= ${F:T} # name override
_F:= ${DESTDIR}${HTMLDOCDIR}/${_FDIR}/${_FNAME} # installed path
_FILE:= ${F}
.if ${MKUPDATE} == "no"
${_F}! ${_FILE} __fileinstall # install rule
.if !defined(BUILD) && !make(all) && !make(${_FILE})
${_F}! .MADE # no build at install
.endif
.else
${_F}: ${_FILE} __fileinstall # install rule
.if !defined(BUILD) && !make(all) && !make(${_FILE})
${_F}: .MADE # no build at install
.endif
.endif
filesinstall:: ${_F}
.PRECIOUS: ${_F} # keep if install fails
.endfor
.endif
.include <bsd.prog.mk>

View File

@ -1 +0,0 @@
Tue Dec 8 21:02:17 UTC 2009 (import)

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +0,0 @@
# $NetBSD: Makefile,v 1.5 2008/05/03 14:48:32 lukem Exp $
LIBISPRIVATE= yes
LIB= isc
SRCS= assertions.c error.c interfaceiter.c isc_strerror.c lib.c mem.c \
msgcat.c net.c strerror.c netaddr.c netscope.c sockaddr.c
NTPSRCDIR=lib${LIB}
.include <bsd.lib.mk>

View File

@ -1,22 +0,0 @@
# $NetBSD: Makefile,v 1.10 2008/05/03 14:48:32 lukem Exp $
LIBISPRIVATE= yes
LIB= ntp
SRCS= a_md5encrypt.c adjtime.c atoint.c atolfp.c atouint.c \
audio.c authkeys.c authreadkeys.c authusekey.c \
buftvtots.c caljulian.c caltontp.c calyearstart.c \
clocktime.c clocktypes.c decodenetnum.c dofptoa.c dolfptoa.c \
findconfig.c fptoa.c fptoms.c getopt.c hextoint.c \
hextolfp.c humandate.c icom.c inttoa.c iosignal.c lib_strbuf.c \
machines.c md5c.c \
memmove.c mfptoa.c mfptoms.c mktime.c modetoa.c mstolfp.c msutotsf.c \
msyslog.c netof.c ntp_random.c ntp_rfc2553.c numtoa.c numtohost.c \
octtoint.c prettydate.c \
refnumtoa.c socktoa.c socktohost.c statestr.c syssignal.c \
systime.c tsftomsu.c \
tstotv.c tvtoa.c tvtots.c uglydate.c uinttoa.c utvtoa.c ymd2yd.c \
recvbuff.c
NTPSRCDIR=lib${LIB}
.include <bsd.lib.mk>

View File

@ -1,11 +0,0 @@
# $NetBSD: Makefile,v 1.2 2008/05/03 14:48:32 lukem Exp $
LIBISPRIVATE= yes
LIB= opts
SRCS= libopts.c
NTPSRCDIR=lib${LIB}
.include <bsd.own.mk>
.include <bsd.lib.mk>

View File

@ -1,14 +0,0 @@
# $NetBSD: Makefile,v 1.7 2008/05/03 14:48:32 lukem Exp $
LIBISPRIVATE= yes
LIB= parse
SRCS= binio.c clk_computime.c clk_dcf7000.c clk_hopf6021.c \
clk_meinberg.c clk_rawdcf.c clk_rcc8000.c clk_schmid.c \
clk_trimtaip.c clk_trimtsip.c clk_varitext.c clk_wharton.c \
data_mbg.c gpstolfp.c ieee754io.c info_trimble.c \
mfp_mul.c parse.c parse_conf.c trim_info.c
NTPSRCDIR=lib${LIB}
.include <bsd.lib.mk>

View File

@ -1,9 +0,0 @@
# $NetBSD: Makefile,v 1.2 2007/01/06 19:45:29 kardel Exp $
PROG= ntp-keygen
MAN= ntp-keygen.8
SRCS= ntp-keygen.c ntp-keygen-opts.c
NTPSRCDIR= util
.include <bsd.prog.mk>

View File

@ -1,176 +0,0 @@
.TH NTP-KEYGEN 1 2009-12-08 "(ntp 4.2.4p8)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (ntp-keygen.1)
.\"
.\" It has been AutoGen-ed Tuesday December 8, 2009 at 08:14:57 AM EST
.\" From the definitions ntp-keygen-opts.def
.\" and the template file agman1.tpl
.\"
.SH NAME
ntp-keygen \- Create a NTP host key
.SH SYNOPSIS
.B ntp-keygen
.\" Mixture of short (flag) options and long options
.RB [ \-\fIflag\fP " [\fIvalue\fP]]... [" \--\fIopt-name\fP " [[=| ]\fIvalue\fP]]..."
.PP
All arguments must be options.
.SH "DESCRIPTION"
This manual page documents, briefly, the \fBntp-keygen\fP command.
If there is no new host key, look for an existing one.
If one is not found, create it.
.SH OPTIONS
.TP
.BR \-c " \fIscheme\fP, " \--certificate "=" \fIscheme\fP
certificate scheme.
.sp
Just some descriptive text.
.TP
.BR \-d ", " \--debug-level
Increase output debug message level.
This option may appear an unlimited number of times.
.sp
Increase the debugging message output level.
.TP
.BR \-D " \fIstring\fP, " \--set-debug-level "=" \fIstring\fP
Set the output debug message level.
This option may appear an unlimited number of times.
.sp
Set the output debugging level. Can be supplied multiple times,
but each overrides the previous value(s).
.TP
.BR \-e ", " \--id-key
Write identity keys.
.sp
Just some descriptive text.
.TP
.BR \-G ", " \--gq-params
Generate GQ parameters and keys.
.sp
Just some descriptive text.
.TP
.BR \-g ", " \--gq-keys
update GQ keys.
.sp
Just some descriptive text.
.TP
.BR \-H ", " \--host-key
generate RSA host key.
.sp
Just some descriptive text.
.TP
.BR \-I ", " \--iffkey
generate IFF parameters.
.sp
Just some descriptive text.
.TP
.BR \-i ", " \--issuer-name
set issuer name.
.sp
Just some descriptive text.
.TP
.BR \-M ", " \--md5key
generate MD5 keys.
.sp
Just some descriptive text.
.TP
.BR \-m " \fImodulus\fP, " \--modulus "=" \fImodulus\fP
modulus.
This option takes an integer number as its argument.
The value of \fImodulus\fP is constrained to being:
.in +4
.nf
.na
in the range 256 through 2048
.fi
.in -4
.sp
Just some descriptive text.
.TP
.BR \-P ", " \--pvt-cert
generate PC private certificate.
.sp
Just some descriptive text.
.TP
.BR \-p " \fIpasswd\fP, " \--pvt-passwd "=" \fIpasswd\fP
output private password.
.sp
Just some descriptive text.
.TP
.BR \-q " \fIpasswd\fP, " \--get-pvt-passwd "=" \fIpasswd\fP
input private password.
.sp
Just some descriptive text.
.TP
.BR \-S " \fIsign\fP, " \--sign-key "=" \fIsign\fP
generate sign key (RSA or DSA).
.sp
Just some descriptive text.
.TP
.BR \-s " \fIhost\fP, " \--subject-name "=" \fIhost\fP
set subject name.
.sp
Just some descriptive text.
.TP
.BR \-T ", " \--trusted-cert
trusted certificate (TC scheme).
.sp
Just some descriptive text.
.TP
.BR \-V " \fInum\fP, " \--mv-params "=" \fInum\fP
generate <num> MV parameters.
This option takes an integer number as its argument.
.sp
Just some descriptive text.
.TP
.BR \-v " \fInum\fP, " \--mv-keys "=" \fInum\fP
update <num> MV keys.
This option takes an integer number as its argument.
.sp
Just some descriptive text.
.TP
.BR \-? , " \--help"
Display usage information and exit.
.TP
.BR \-! , " \--more-help"
Extended usage information passed thru pager.
.TP
.BR \-> " [\fIrcfile\fP]," " \--save-opts" "[=\fIrcfile\fP]"
Save the option state to \fIrcfile\fP. The default is the \fIlast\fP
configuration file listed in the \fBOPTION PRESETS\fP section, below.
.TP
.BR \-< " \fIrcfile\fP," " \--load-opts" "=\fIrcfile\fP," " \--no-load-opts"
Load options from \fIrcfile\fP.
The \fIno-load-opts\fP form will disable the loading
of earlier RC/INI files. \fI--no-load-opts\fP is handled early,
out of order.
.TP
.BR \-v " [{\fIv|c|n\fP}]," " \--version" "[=\fI{v|c|n}\fP]"
Output version of program and exit. The default mode is `v', a simple
version. The `c' mode will print copyright information and `n' will
print the full copyright notice.
.SH OPTION PRESETS
Any option that is not marked as \fInot presettable\fP may be preset
by loading values from configuration ("RC" or ".INI") file(s) and values from
environment variables named:
.nf
\fBNTP_KEYGEN_<option-name>\fP or \fBNTP_KEYGEN\fP
.fi
.aj
The environmental presets take precedence (are processed later than)
the configuration files.
The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
If any of these are directories, then the file \fI.ntprc\fP
is searched for within those directories.
.SH AUTHOR
David L. Mills and/or others
.br
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
.PP
.nf
.na
see /usr/share/doc/html/ntp/copyright.html
.fi
.ad
.PP
This manual page was \fIAutoGen\fP-erated from the \fBntp-keygen\fP
option definitions.

View File

@ -1,36 +0,0 @@
# $NetBSD: Makefile,v 1.17 2007/01/13 19:27:50 kardel Exp $
PROG= ntpd
MAN= ntpd.8
SRCS= cmd_args.c ntp_config.c ntp_control.c ntp_crypto.c ntp_filegen.c \
ntp_intres.c ntp_io.c ntp_loopfilter.c ntp_monitor.c \
ntp_peer.c ntp_proto.c ntp_refclock.c ntp_request.c \
ntp_restrict.c ntp_timer.c ntp_util.c ntpd-opts.c ntpd.c \
refclock_acts.c \
refclock_arbiter.c refclock_arc.c refclock_as2201.c \
refclock_atom.c refclock_bancomm.c refclock_chronolog.c \
refclock_chu.c refclock_conf.c refclock_datum.c \
refclock_dumbclock.c refclock_fg.c refclock_gpsvme.c \
refclock_heath.c refclock_hopfpci.c refclock_hopfser.c \
refclock_hpgps.c refclock_irig.c refclock_jjy.c \
refclock_jupiter.c refclock_leitch.c refclock_local.c \
refclock_msfees.c refclock_mx4200.c refclock_neoclock4x.c \
refclock_nmea.c refclock_oncore.c refclock_palisade.c \
refclock_parse.c refclock_pcf.c refclock_pst.c \
refclock_ripencc.c refclock_shm.c refclock_tpro.c \
refclock_trak.c refclock_true.c refclock_tt560.c \
refclock_ulink.c refclock_wwv.c refclock_wwvb.c \
refclock_zyfer.c emalloc.c
.include <bsd.own.mk>
.PATH: ${NETBSDSRCDIR}/dist/ntp/libntp
LIBPARSE!= cd ${.CURDIR}/../libparse && ${PRINTOBJDIR}
LDADD+= -L${LIBPARSE} -lparse -L${LIBISC} -lisc
DPADD+= ${LIBPARSE}/libparse.a ${LIBISC}/libisc.a
LDADD+= -lutil -lm
DPADD+= ${LIBUTIL} ${LIBM}
.include <bsd.prog.mk>

View File

@ -1,296 +0,0 @@
.TH NTPD 1 2009-12-08 "( 4.2.4p8)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (ntpd.1)
.\"
.\" It has been AutoGen-ed Tuesday December 8, 2009 at 08:13:11 AM EST
.\" From the definitions ntpd-opts.def
.\" and the template file agman1.tpl
.\"
.SH NAME
ntpd \- NTP daemon program
.SH SYNOPSIS
.B ntpd
.\" Mixture of short (flag) options and long options
.RB [ \-\fIflag\fP " [\fIvalue\fP]]... [" \--\fIopt-name\fP " [[=| ]\fIvalue\fP]]..."
.PP
All arguments must be options.
.SH "DESCRIPTION"
This manual page documents, briefly, the \fBntpd\fP command.
.SH OPTIONS
.TP
.BR \-4 ", " \--ipv4
Force IPv4 DNS name resolution.
This option is a member of the ipv4 class of options.
.sp
Force DNS resolution of following host names on the command line
to the IPv4 namespace.
.TP
.BR \-6 ", " \--ipv6
Force IPv6 DNS name resolution.
This option is a member of the ipv4 class of options.
.sp
Force DNS resolution of following host names on the command line
to the IPv6 namespace.
.TP
.BR \-a ", " \--authreq
Require crypto authentication.
This option must not appear in combination with any of the following options:
authnoreq.
.sp
Require cryptographic authentication for broadcast client,
multicast client and symmetric passive associations.
This is the default.
.TP
.BR \-A ", " \--authnoreq
Do not require crypto authentication.
This option must not appear in combination with any of the following options:
authreq.
.sp
Do not require cryptographic authentication for broadcast client,
multicast client and symmetric passive associations.
This is almost never a good idea.
.TP
.BR \-b ", " \--bcastsync
Allow us to sync to broadcast servers.
.sp
.TP
.BR \-c " \fIstring\fP, " \--configfile "=" \fIstring\fP
configuration file name.
.sp
The name and path of the configuration file,
/etc/ntp.conf
by default.
.TP
.BR \-d ", " \--debug-level
Increase output debug message level.
This option may appear an unlimited number of times.
.sp
Increase the debugging message output level.
.TP
.BR \-D " \fIstring\fP, " \--set-debug-level "=" \fIstring\fP
Set the output debug message level.
This option may appear an unlimited number of times.
.sp
Set the output debugging level. Can be supplied multiple times,
but each overrides the previous value(s).
.TP
.BR \-f " \fIstring\fP, " \--driftfile "=" \fIstring\fP
frequency drift file name.
.sp
The name and path of the frequency file,
/etc/ntp.drift
by default.
This is the same operation as the
driftfile driftfile
configuration specification in the
/etc/ntp.conf
file.
.TP
.BR \-g ", " \--panicgate
Allow the first adjustment to be Big.
.sp
Normally,
ntpd
exits with a message to the system log if the offset exceeds the panic threshold, which is 1000 s by default. This option allows the time to be set to any value without restriction; however, this can happen only once. If the threshold is exceeded after that,
ntpd
will exit with a message to the system log. This option can be used with the
-q
and
-x
options.
See the
tinker
configuration file directive for other options.
.TP
.BR \-i " \fIstring\fP, " \--jaildir "=" \fIstring\fP
Jail directory.
.sp
Chroot the server to the directory
jaildir
.
This option also implies that the server attempts to drop root privileges at startup (otherwise, chroot gives very little additional security), and it is only available if the OS supports to run the server without full root privileges.
You may need to also specify a
-u
option.
.TP
.BR \-I " \fIiface\fP, " \--interface "=" \fIiface\fP
Listen on interface.
This option may appear an unlimited number of times.
.sp
.TP
.BR \-k " \fIstring\fP, " \--keyfile "=" \fIstring\fP
path to symmetric keys.
.sp
Specify the name and path of the symmetric key file.
/etc/ntp.keys
is the default.
This is the same operation as the
keys keyfile
configuration file directive.
.TP
.BR \-l " \fIstring\fP, " \--logfile "=" \fIstring\fP
path to the log file.
.sp
Specify the name and path of the log file.
The default is the system log file.
This is the same operation as the
logfile logfile
configuration file directive.
.TP
.BR \-L ", " \--novirtualips
Do not listen to virtual IPs.
.sp
Do not listen to virtual IPs. The default is to listen.
.TP
.BR \-M ", " \--modifymmtimer
Modify Multimedia Timer (Windows only).
.sp
Set the Windows Multimedia Timer to highest resolution.
.TP
.BR \-n ", " \--nofork
Do not fork.
.sp
.TP
.BR \-N ", " \--nice
Run at high priority.
.sp
To the extent permitted by the operating system, run
ntpd
at the highest priority.
.TP
.BR \-p " \fIstring\fP, " \--pidfile "=" \fIstring\fP
path to the PID file.
.sp
Specify the name and path of the file used to record
ntpd's
process ID.
This is the same operation as the
pidfile pidfile
configuration file directive.
.TP
.BR \-P " \fInumber\fP, " \--priority "=" \fInumber\fP
Process priority.
This option takes an integer number as its argument.
.sp
To the extent permitted by the operating system, run
ntpd
at the specified
sched_setscheduler(SCHED_FIFO)
priority.
.TP
.BR \-q ", " \--quit
Set the time and quit.
.sp
ntpd
will exit just after the first time the clock is set. This behavior mimics that of the
ntpdate
program, which is to be retired.
The
-g
and
-x
options can be used with this option.
Note: The kernel time discipline is disabled with this option.
.TP
.BR \-r " \fIstring\fP, " \--propagationdelay "=" \fIstring\fP
Broadcast/propagation delay.
.sp
Specify the default propagation delay from the broadcast/multicast server to this client. This is necessary only if the delay cannot be computed automatically by the protocol.
.TP
.BR \-U " \fInumber\fP, " \--updateinterval "=" \fInumber\fP
interval in seconds between scans for new or dropped interfaces.
This option takes an integer number as its argument.
.sp
Give the time in seconds between two scans for new or dropped interfaces.
For systems with routing socket support the scans will be performed shortly after the interface change
has been detected by the system.
Use 0 to disable scanning.
.TP
.BR \-s " \fIstring\fP, " \--statsdir "=" \fIstring\fP
Statistics file location.
.sp
Specify the directory path for files created by the statistics facility.
This is the same operation as the
statsdir statsdir
configuration file directive.
.TP
.BR \-t " \fItkey\fP, " \--trustedkey "=" \fItkey\fP
Trusted key number.
This option may appear an unlimited number of times.
.sp
Add a key number to the trusted key list.
.TP
.BR \-u " \fIstring\fP, " \--user "=" \fIstring\fP
Run as userid (or userid:groupid).
.sp
Specify a user, and optionally a group, to switch to.
This option is only available if the OS supports to run the server without full root privileges.
Currently, this option is supported under NetBSD (configure with
--enable-clockctl
) and Linux (configure with
--enable-linuxcaps
).
.TP
.BR \-v " \fInvar\fP, " \--var "=" \fInvar\fP
make ARG an ntp variable (RW).
This option may appear an unlimited number of times.
.sp
.TP
.BR \-V " \fIndvar\fP, " \--dvar "=" \fIndvar\fP
make ARG an ntp variable (RW|DEF).
This option may appear an unlimited number of times.
.sp
.TP
.BR \-x ", " \--slew
Slew up to 600 seconds.
.sp
Normally, the time is slewed if the offset is less than the step threshold, which is 128 ms by default, and stepped if above the threshold.
This option sets the threshold to 600 s, which is well within the accuracy window to set the clock manually.
Note: Since the slew rate of typical Unix kernels is limited to 0.5 ms/s, each second of adjustment requires an amortization interval of 2000 s.
Thus, an adjustment as much as 600 s will take almost 14 days to complete.
This option can be used with the
-g
and
-q
options.
See the
tinker
configuration file directive for other options.
Note: The kernel time discipline is disabled with this option.
.TP
.BR \-? , " \--help"
Display usage information and exit.
.TP
.BR \-! , " \--more-help"
Extended usage information passed thru pager.
.TP
.BR \-v " [{\fIv|c|n\fP}]," " \--version" "[=\fI{v|c|n}\fP]"
Output version of program and exit. The default mode is `v', a simple
version. The `c' mode will print copyright information and `n' will
print the full copyright notice.
.SH OPTION PRESETS
Any option that is not marked as \fInot presettable\fP may be preset
by loading values from environment variables named:
.nf
\fBNTPD_<option-name>\fP or \fBNTPD\fP
.fi
.aj
.SH AUTHOR
David L. Mills and/or others
.br
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
.PP
.nf
.na
see /usr/share/doc/html/ntp/copyright.html
.fi
.ad
.PP
This manual page was \fIAutoGen\fP-erated from the \fBntpd\fP
option definitions.

View File

@ -1,15 +0,0 @@
# $NetBSD: Makefile,v 1.6 2006/08/26 18:15:39 christos Exp $
PROG= ntpdate
MAN= ntpdate.8
SRCS= ntpdate.c
.include <bsd.own.mk>
LDADD+= -L${LIBISC} -lisc
DPADD+= ${LIBISC}/libisc.a
LDADD+= -lutil -lm
DPADD+= ${LIBUTIL} ${LIBM}
.include <bsd.prog.mk>

View File

@ -1,203 +0,0 @@
.\" $NetBSD: ntpdate.8,v 1.10 2010/01/28 14:16:33 mbalmer Exp $
.\" Converted from HTML to mandoc by ntp-html2mdoc.pl
.\"
.Dd January 28, 2010
.Dt NTPDATE 8
.Os
.Sh NAME
.Nm ntpdate
.Nd set the date and time via NTP
.Sh SYNOPSIS
.Nm
.Op Fl bBdoqsuv
.Op Fl a Ar key
.Op Fl e Ar authdelay
.Op Fl k Ar keyfile
.Op Fl o Ar version
.Op Fl p Ar samples
.Op Fl t Ar timeout
.Op Ar server ...
.Sh DESCRIPTION
.Nm
sets the local date and time by polling the Network Time
Protocol (NTP) server(s) given as the
.Ar server
arguments to determine
the correct time. It must be run as root on the local host. A number of
samples are obtained from each of the servers specified and a subset of
the NTP clock filter and selection algorithms are applied to select the
best of these. Note that the accuracy and reliability of
.Nm
depends on the number of servers, the number of polls each time it is run
and the interval between runs.
.Pp
.Nm
can be run manually as necessary to set the host clock,
or it can be run from the host startup script to set the clock at boot
time. This is useful in some cases to set the clock initially before starting
the NTP daemon
.Pa ntpd .
It is also possible to run
.Nm
from a
.Pa cron
script. However, it is important to note that
.Nm
with contrived
.Pa cron
scripts is no substitute for the NTP daemon,
which uses sophisticated algorithms to maximize accuracy and reliability
while minimizing resource use. Finally, since
.Nm
does not
discipline the host clock frequency as does
.Pa ntpd ,
the accuracy
using
.Nm
is limited.
.Pp
Time adjustments are made by
.Nm
in one of two ways. If
.Nm
determines the clock is in error more than 0.5 second
it will simply step the time by calling the system
.Xr settimeofday 2
routine. If the error is less than 0.5 seconds, it will slew the time by
calling the system
.Xr adjtime 2
routine. The latter technique is
less disruptive and more accurate when the error is small, and works quite
well when
.Nm
is run by
.Pa cron
every hour or two.
.Pp
.Nm
will decline to set the date if an NTP server daemon
(e.g.,
.Pa ntpd
) is running on the same host. When running
.Nm
on a regular basis from
.Pa cron
as an alternative to running a daemon,
doing so once every hour or two will result in precise enough timekeeping
to avoid stepping the clock.
.Pp
If NetInfo support is compiled into
.Nm ,
then the
.Pa server
argument is optional if
.Nm
can find a time
server in the NetInfo configuration for
.Pa ntpd
.
.Sh COMMAND LINE OPTIONS
.Bl -tag -width indent
.It Fl a Ar key
Enable the authentication function and specify the key identifier to be
used for authentication as the argument
.Ar key
.Nm .
The
keys and key identifiers must match in both the client and server key files.
The default is to disable the authentication function.
.It Fl B
Force the time to always be slewed using the adjtime() system call, even
if the measured offset is greater than +-128 ms. The default is to step
the time using settimeofday() if the offset is greater than +-128 ms. Note
that, if the offset is much greater than +-128 ms in this case, that it
can take a long time (hours) to slew the clock to the correct value. During
this time. the host should not be used to synchronize clients.
.It Fl b
Force the time to be stepped using the settimeofday() system call, rather
than slewed (default) using the adjtime() system call. This option should
be used when called from a startup file at boot time.
.It Fl d
Enable the debugging mode, in which
.Nm
will go through all
the steps, but not adjust the local clock. Information useful for general
debugging will also be printed.
.It Fl e Ar authdelay
Specify the processing delay to perform an authentication function as the
value
.Ar authdelay
, in seconds and fraction (see
.Pa ntpd
for
details). This number is usually small enough to be negligible for most
purposes, though specifying a value may improve timekeeping on very slow
CPU's.
.It Fl k Ar keyfile
Specify the path for the authentication key file as the string
.Ar keyfile
.
The default is
.Pa /etc/ntp.keys .
This file should be in the format
described in
.Pa ntpd
.
.It Fl o Ar version
Specify the NTP version for outgoing packets as the integer
.Ar version
,
which can be 1 or 2. The default is 3. This allows
.Nm
to
be used with older NTP versions.
.It Fl p Ar samples
Specify the number of samples to be acquired from each server as the integer
.Ar samples
, with values from 1 to 8 inclusive. The default is 4.
.It Fl q
Query only - don't set the clock.
.It Fl s
Divert logging output from the standard output (default) to the system
.Pa syslog
facility. This is designed primarily for convenience of
.Pa cron
scripts.
.It Fl t Ar timeout
Specify the maximum time waiting for a server response as the value
.Ar timeout
,
in seconds and fraction. The value is rounded to a multiple of 0.2 seconds.
The default is 1 second, a value suitable for polling across a LAN.
.It Fl u
Direct
.Nm
to use an unprivileged port for outgoing packets.
This is most useful when behind a firewall that blocks incoming traffic
to privileged ports, and you want to synchronise with hosts beyond the
firewall. Note that the
.Fl d
option always uses unprivileged ports.
.It Fl v
Be verbose. This option will cause
.Nm
's version identification
string to be logged.
.El
.Sh FILES
.Bl -tag -width /etc/ntp.keys -compact
.It Pa /etc/ntp.keys
encryption keys used by
.Nm .
.El
.Sh AUTHORS
David L. Mills (mills@udel.edu)
.Sh BUGS
The slew adjustment is actually 50% larger than the measured offset, since
this (it is argued) will tend to keep a badly drifting clock more accurate.
This is probably not a good idea and may cause a troubling hunt for some
values of the kernel variables
.Pa tick
and
.Pa tickadj .

View File

@ -1,11 +0,0 @@
# $NetBSD: Makefile,v 1.6 2007/01/06 19:45:29 kardel Exp $
PROG= ntpdc
MAN= ntpdc.8
SRCS= ntpdc.c ntpdc_ops.c ntpdc-opts.c
LDADD+= -L${LIBISC} -lisc
LDADD+= -ledit -ltermcap
DPADD+= ${LIBISC}/libisc.a
.include <bsd.prog.mk>

View File

@ -1,158 +0,0 @@
.TH NTPDC 1 2009-12-08 "( 4.2.4p8)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (ntpdc.1)
.\"
.\" It has been AutoGen-ed Tuesday December 8, 2009 at 08:14:01 AM EST
.\" From the definitions ntpdc-opts.def
.\" and the template file agman1.tpl
.\"
.SH NAME
ntpdc \- vendor-specific NTP query program
.SH SYNOPSIS
.B ntpdc
.\" Mixture of short (flag) options and long options
.RB [ \-\fIflag\fP " [\fIvalue\fP]]... [" \--\fIopt-name\fP " [[=| ]\fIvalue\fP]]..."
.br
.in +8
[ host ...]
.SH "DESCRIPTION"
This manual page documents, briefly, the \fBntpdc\fP command.
The
ntpdc
utility program is used to query an NTP daemon about its
current state and to request changes in that state.
It uses NTP mode 7 control message formats described in the source code.
The program may
be run either in interactive mode or controlled using command line
arguments.
Extensive state and statistics information is available
through the
ntpdc
interface.
In addition, nearly all the
configuration options which can be specified at startup using
ntpd's configuration file may also be specified at run time using
ntpdc.
.SH OPTIONS
.TP
.BR \-4 ", " \--ipv4
Force IPv4 DNS name resolution.
This option is a member of the ipv4 class of options.
.sp
Force DNS resolution of following host names on the command line
to the IPv4 namespace.
.TP
.BR \-6 ", " \--ipv6
Force IPv6 DNS name resolution.
This option is a member of the ipv4 class of options.
.sp
Force DNS resolution of following host names on the command line
to the IPv6 namespace.
.TP
.BR \-c " \fIcmd\fP, " \--command "=" \fIcmd\fP
run a command and exit.
This option may appear an unlimited number of times.
.sp
The following argument is interpreted as an interactive format command
and is added to the list of commands to be executed on the specified
host(s).
.TP
.BR \-l ", " \--listpeers
Print a list of the peers.
This option must not appear in combination with any of the following options:
command.
.sp
Print a list of the peers known to the server as well as a summary of
their state. This is equivalent to the 'listpeers' interactive command.
.TP
.BR \-p ", " \--peers
Print a list of the peers.
This option must not appear in combination with any of the following options:
command.
.sp
Print a list of the peers known to the server as well as a summary
of their state. This is equivalent to the 'peers' interactive command.
.TP
.BR \-s ", " \--showpeers
Show a list of the peers.
This option must not appear in combination with any of the following options:
command.
.sp
Print a list of the peers known to the server as well as a summary
of their state. This is equivalent to the 'dmpeers' interactive command.
.TP
.BR \-i ", " \--interactive
Force ntpq to operate in interactive mode.
This option must not appear in combination with any of the following options:
command, listpeers, peers, showpeers.
.sp
Force ntpq to operate in interactive mode. Prompts will be written
to the standard output and commands read from the standard input.
.TP
.BR \-d ", " \--debug-level
Increase output debug message level.
This option may appear an unlimited number of times.
.sp
Increase the debugging message output level.
.TP
.BR \-D " \fIstring\fP, " \--set-debug-level "=" \fIstring\fP
Set the output debug message level.
This option may appear an unlimited number of times.
.sp
Set the output debugging level. Can be supplied multiple times,
but each overrides the previous value(s).
.TP
.BR \-n ", " \--numeric
numeric host addresses.
.sp
Output all host addresses in dotted-quad numeric format rather than
converting to the canonical host names.
.TP
.BR \-? , " \--help"
Display usage information and exit.
.TP
.BR \-! , " \--more-help"
Extended usage information passed thru pager.
.TP
.BR \-> " [\fIrcfile\fP]," " \--save-opts" "[=\fIrcfile\fP]"
Save the option state to \fIrcfile\fP. The default is the \fIlast\fP
configuration file listed in the \fBOPTION PRESETS\fP section, below.
.TP
.BR \-< " \fIrcfile\fP," " \--load-opts" "=\fIrcfile\fP," " \--no-load-opts"
Load options from \fIrcfile\fP.
The \fIno-load-opts\fP form will disable the loading
of earlier RC/INI files. \fI--no-load-opts\fP is handled early,
out of order.
.TP
.BR \-v " [{\fIv|c|n\fP}]," " \--version" "[=\fI{v|c|n}\fP]"
Output version of program and exit. The default mode is `v', a simple
version. The `c' mode will print copyright information and `n' will
print the full copyright notice.
.SH OPTION PRESETS
Any option that is not marked as \fInot presettable\fP may be preset
by loading values from configuration ("RC" or ".INI") file(s) and values from
environment variables named:
.nf
\fBNTPDC_<option-name>\fP or \fBNTPDC\fP
.fi
.aj
The environmental presets take precedence (are processed later than)
the configuration files.
The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
If any of these are directories, then the file \fI.ntprc\fP
is searched for within those directories.
.SH AUTHOR
David L. Mills and/or others
.br
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
.PP
.nf
.na
see /usr/share/doc/html/ntp/copyright.html
.fi
.ad
.PP
This manual page was \fIAutoGen\fP-erated from the \fBntpdc\fP
option definitions.

View File

@ -1,13 +0,0 @@
# $NetBSD: Makefile,v 1.7 2007/01/06 19:45:29 kardel Exp $
PROG= ntpq
MAN= ntpq.8
SRCS= ntpq.c ntpq-subs.c ntpq-opts.c
LDADD+= -L${LIBISC} -lisc
LDADD+= -ledit -ltermcap
DPADD+= ${LIBISC}/libisc.a
.include <bsd.own.mk>
.include <bsd.prog.mk>

View File

@ -1,383 +0,0 @@
.TH NTPQ 1 2009-12-08 "( 4.2.4p8)" "Programmer's Manual"
.\" EDIT THIS FILE WITH CAUTION (ntpq.1)
.\"
.\" It has been AutoGen-ed Tuesday December 8, 2009 at 08:14:27 AM EST
.\" From the definitions ntpq-opts.def
.\" and the template file agman1.tpl
.\"
.SH NAME
ntpq \- standard NTP query program
.SH SYNOPSIS
.B ntpq
.\" Mixture of short (flag) options and long options
.RB [ \-\fIflag\fP " [\fIvalue\fP]]... [" \--\fIopt-name\fP " [[=| ]\fIvalue\fP]]..."
.br
.in +8
[ host ...]
.SH "DESCRIPTION"
This manual page documents, briefly, the \fBntpq\fP command.
The
ntpq
utility program is used to query NTP servers which
implement the standard NTP mode 6 control message formats defined
in Appendix B of the NTPv3 specification RFC1305, requesting
information about current state and/or changes in that state.
The same formats are used in NTPv4, although some of the
variables have changed and new ones added. The description on this
page is for the NTPv4 variables.
The program may be run either in interactive mode or controlled using
command line arguments.
Requests to read and write arbitrary
variables can be assembled, with raw and pretty-printed output
options being available.
The
ntpq
utility can also obtain and print a
list of peers in a common format by sending multiple queries to the
server.
If one or more request options is included on the command line
when
ntpq
is executed, each of the requests will be sent
to the NTP servers running on each of the hosts given as command
line arguments, or on localhost by default.
If no request options
are given,
ntpq
will attempt to read commands from the
standard input and execute these on the NTP server running on the
first host given on the command line, again defaulting to localhost
when no other host is specified.
The
ntpq
utility will prompt for
commands if the standard input is a terminal device.
The
ntpq
utility uses NTP mode 6 packets to communicate with the
NTP server, and hence can be used to query any compatible server on
the network which permits it.
Note that since NTP is a UDP protocol
this communication will be somewhat unreliable, especially over
large distances in terms of network topology.
The
ntpq
utility makes
one attempt to retransmit requests, and will time requests out if
the remote host is not heard from within a suitable timeout
time.
Specifying a
command line option other than
.Fl i
or
.Fl n
will
cause the specified query (queries) to be sent to the indicated
host(s) immediately.
Otherwise,
ntpq
will attempt to read
interactive format commands from the standard input.
.Ss "Internal Commands"
Interactive format commands consist of a keyword followed by zero
to four arguments.
Only enough characters of the full keyword to
uniquely identify the command need be typed.
A
number of interactive format commands are executed entirely within
the
ntpq
utility itself and do not result in NTP mode 6
requests being sent to a server.
These are described following.
.sp
.IR "? [command_keyword]"
A `\&?'
by itself will print a list of all the command
keywords known to this incarnation of
ntpq.
A
.Ql \&?
followed by a command keyword will print function and usage
information about the command.
This command is probably a better
source of information about
ntpq
than this manual
page.
.sp
.IR "addvars"
.Ar variable_name [=value] ...
.Xc
.sp
.IR "rmvars variable_name ..."
.sp
.IR "clearvars"
The data carried by NTP mode 6 messages consists of a list of
items of the form
.Ql variable_name=value ,
where the
.Ql =value
is ignored, and can be omitted,
in requests to the server to read variables.
The
ntpq
utility maintains an internal list in which data to be included in control
messages can be assembled, and sent using the
.Ic readlist
and
.Ic writelist
commands described below.
The
.Ic addvars
command allows variables and their optional values to be added to
the list.
If more than one variable is to be added, the list should
be comma-separated and not contain white space.
The
.Ic rmvars
command can be used to remove individual variables from the list,
while the
.Ic clearlist
command removes all variables from the
list.
.sp
.IR "authenticate [ yes | no ]"
Normally
ntpq
does not authenticate requests unless
they are write requests.
The command
.Ql authenticate yes
causes
ntpq
to send authentication with all requests it
makes.
Authenticated requests causes some servers to handle
requests slightly differently, and can occasionally melt the CPU in
fuzzballs if you turn authentication on before doing a
.Ic peer
display.
The command
.Ql authenticate
causes
ntpq
to display whether or not
ntpq
is currently autheinticating requests.
.sp
.IR "cooked"
Causes output from query commands to be "cooked", so that
variables which are recognized by
ntpq
will have their
values reformatted for human consumption.
Variables which
ntpq
thinks should have a decodable value but didn't are
marked with a trailing
.Ql \&? .
.@item debug [
.Cm more |
.Cm less |
.Cm off
]
.Xc
With no argument, displays the current debug level.
Otherwise, the debug level is changed to the indicated level.
.sp
.IR "delay milliseconds"
Specify a time interval to be added to timestamps included in
requests which require authentication.
This is used to enable
(unreliable) server reconfiguration over long delay network paths
or between machines whose clocks are unsynchronized.
Actually the
server does not now require timestamps in authenticated requests,
so this command may be obsolete.
.sp
.IR "host hostname"
Set the host to which future queries will be sent.
Hostname may
be either a host name or a numeric address.
.sp
.IR "hostnames Cm yes | Cm no"
If
.Cm yes
is specified, host names are printed in
information displays.
If
.Cm no
is specified, numeric
addresses are printed instead.
The default is
.Cm yes ,
unless
modified using the command line
.Fl n
switch.
.sp
.IR "keyid keyid"
This command allows the specification of a key number to be
used to authenticate configuration requests.
This must correspond
to a key number the server has been configured to use for this
purpose.
.sp
.IR "ntpversion ["
.Cm 1 |
.Cm 2 |
.Cm 3 |
.Cm 4
]
.Xc
Sets the NTP version number which
ntpq
claims in
packets.
Defaults to 3, Note that mode 6 control messages (and
modes, for that matter) didn't exist in NTP version 1.
There appear
to be no servers left which demand version 1.
With no argument, displays the current NTP version that will be used
when communicating with servers.
.sp
.IR "quit"
Exit
ntpq.
.sp
.IR "passwd"
This command prompts you to type in a password (which will not
be echoed) which will be used to authenticate configuration
requests.
The password must correspond to the key configured for
use by the NTP server for this purpose if such requests are to be
successful.
.sp
.IR "raw"
Causes all output from query commands is printed as received
from the remote server.
The only formating/interpretation done on
the data is to transform nonascii data into a printable (but barely
understandable) form.
.sp
.IR "timeout Ar milliseconds"
Specify a timeout period for responses to server queries.
The
default is about 5000 milliseconds.
Note that since
ntpq
retries each query once after a timeout, the total waiting time for
a timeout will be twice the timeout value set.
.br
.SH OPTIONS
.TP
.BR \-4 ", " \--ipv4
Force IPv4 DNS name resolution.
This option is a member of the ipv4 class of options.
.sp
Force DNS resolution of following host names on the command line
to the IPv4 namespace.
.TP
.BR \-6 ", " \--ipv6
Force IPv6 DNS name resolution.
This option is a member of the ipv4 class of options.
.sp
Force DNS resolution of following host names on the command line
to the IPv6 namespace.
.TP
.BR \-c " \fIcmd\fP, " \--command "=" \fIcmd\fP
run a command and exit.
This option may appear an unlimited number of times.
.sp
The following argument is interpreted as an interactive format command
and is added to the list of commands to be executed on the specified
host(s).
.TP
.BR \-d ", " \--debug-level
Increase output debug message level.
This option may appear an unlimited number of times.
.sp
Increase the debugging message output level.
.TP
.BR \-D " \fIstring\fP, " \--set-debug-level "=" \fIstring\fP
Set the output debug message level.
This option may appear an unlimited number of times.
.sp
Set the output debugging level. Can be supplied multiple times,
but each overrides the previous value(s).
.TP
.BR \-p ", " \--peers
Print a list of the peers.
This option must not appear in combination with any of the following options:
interactive.
.sp
Print a list of the peers known to the server as well as a summary
of their state. This is equivalent to the 'peers' interactive command.
.TP
.BR \-i ", " \--interactive
Force ntpq to operate in interactive mode.
This option must not appear in combination with any of the following options:
command, peers.
.sp
Force ntpq to operate in interactive mode. Prompts will be written
to the standard output and commands read from the standard input.
.TP
.BR \-n ", " \--numeric
numeric host addresses.
.sp
Output all host addresses in dotted-quad numeric format rather than
converting to the canonical host names.
.TP
.BR \-? , " \--help"
Display usage information and exit.
.TP
.BR \-! , " \--more-help"
Extended usage information passed thru pager.
.TP
.BR \-> " [\fIrcfile\fP]," " \--save-opts" "[=\fIrcfile\fP]"
Save the option state to \fIrcfile\fP. The default is the \fIlast\fP
configuration file listed in the \fBOPTION PRESETS\fP section, below.
.TP
.BR \-< " \fIrcfile\fP," " \--load-opts" "=\fIrcfile\fP," " \--no-load-opts"
Load options from \fIrcfile\fP.
The \fIno-load-opts\fP form will disable the loading
of earlier RC/INI files. \fI--no-load-opts\fP is handled early,
out of order.
.TP
.BR \-v " [{\fIv|c|n\fP}]," " \--version" "[=\fI{v|c|n}\fP]"
Output version of program and exit. The default mode is `v', a simple
version. The `c' mode will print copyright information and `n' will
print the full copyright notice.
.SH OPTION PRESETS
Any option that is not marked as \fInot presettable\fP may be preset
by loading values from configuration ("RC" or ".INI") file(s) and values from
environment variables named:
.nf
\fBNTPQ_<option-name>\fP or \fBNTPQ\fP
.fi
.aj
The environmental presets take precedence (are processed later than)
the configuration files.
The \fIhomerc\fP files are "\fI$HOME\fP", and "\fI.\fP".
If any of these are directories, then the file \fI.ntprc\fP
is searched for within those directories.
.SH AUTHOR
David L. Mills and/or others
.br
Please send bug reports to: http://bugs.ntp.org, bugs@ntp.org
.PP
.nf
.na
see /usr/share/doc/html/ntp/copyright.html
.fi
.ad
.PP
This manual page was \fIAutoGen\fP-erated from the \fBntpq\fP
option definitions.

View File

@ -1,11 +0,0 @@
# $NetBSD: Makefile,v 1.8 2006/07/29 08:18:36 kardel Exp $
PROG= ntptime
MAN= ntptime.8
SRCS= ntptime.c
.include <bsd.own.mk>
NTPSRCDIR=util
.include <bsd.prog.mk>

View File

@ -1,59 +0,0 @@
.\" $NetBSD: ntptime.8,v 1.7 2007/12/15 17:49:14 yamt Exp $
.\" Converted from HTML to mandoc by ntp-html2mdoc.pl
.\"
.Dd March 29, 2000
.Dt NTPTIME 8
.Os
.Sh NAME
.Nm ntptime
.Nd read kernel time variables
.Sh SYNOPSIS
.Nm
.Op Fl chr
.Op Fl e Ar est_error
.Op Fl f Ar frequency
.Op Fl m Ar max_error
.Op Fl o Ar offset
.Op Fl s Ar status
.Op Fl t Ar time_constant
.Sh DESCRIPTION
This program is useful only with special kernels described in the
.%T "A Kernel Model for Precision Timekeeping"
page in
.Pa /usr/share/doc/html/ntp/kern.html .
It reads and displays
time-related kernel variables using the
.Xr ntp_gettime 2
system call.
A similar display can be obtained using the
.Nm ntpdc
program and
.Pa kerninfo
command.
.Sh OPTIONS
.Bl -tag -width indent
.It Fl c
Display the execution time of
.Nm
itself.
.It Fl e Ar est_error
Specify estimated error, in microseconds.
.It Fl f Ar frequency
Specify frequency offset, in parts per million.
.It Fl h
Display times in Unix timeval format. Default is NTP format.
.It Fl l
Specify the leap bits as a code from 0 to 3.
.It Fl m Ar max_error
Display help information.
.It Fl o Ar offset
Specify clock offset, in microseconds.
.It Fl r
Display Unix and NTP times in raw format.
.It Fl s Ar status
Specify clock status. Better know what you are doing.
.It Fl t Ar time_constant
Specify time constant, an integer in the range 0-4.
.El
.Sh AUTHORS
David L. Mills (mills@udel.edu)

View File

@ -1,6 +0,0 @@
# $NetBSD: Makefile,v 1.4 2003/12/04 16:41:57 drochner Exp $
MAN= ntptrace.8
SCRIPTS=ntptrace.awk
.include <bsd.prog.mk>

View File

@ -1,61 +0,0 @@
.\" $NetBSD: ntptrace.8,v 1.8 2003/12/26 16:52:18 wiz Exp $
.\" Converted from HTML to mandoc by ntp-html2mdoc.pl
.\"
.Dd March 29, 2000
.Dt NTPTRACE 8
.Os
.Sh NAME
.Nm ntptrace
.Nd "trace a chain of NTP servers back to the primary source"
.Sh SYNOPSIS
.Nm
.Op Fl vdn
.Op Fl r Ar retries
.Op Fl t Ar timeout
.Op Ar server
.Sh DESCRIPTION
.Nm
determines where a given Network Time Protocol (NTP)
server gets its time from, and follows the chain of NTP servers back to
their master time source. If given no arguments, it starts with
.Pa localhost .
Here is an example of the output from
.Nm :
.Pp
.nf
% ntptrace
localhost: stratum 4, offset 0.0019529, synch distance 0.144135
server2ozo.com: stratum 2, offset 0.0124263, synch distance 0.115784
usndh.edu: stratum 1, offset 0.0019298, synch distance 0.011993, refid 'WWVB'
.fi
.Pp
On each line, the fields are (left to right): the host name, the host stratum,
the time offset between that host and the local host (as measured by
.Nm
;
this is why it is not always zero for
.Pa localhost
), the host synchronization
distance, and (only for stratum-1 servers) the reference clock ID. All
times are given in seconds. Note that the stratum is the server hop count
to the primary source, while the synchronization distance is the estimated
error relative to the primary source. These terms are precisely defined
in RFC-1305.
.Sh OPTIONS
.Bl -tag -width indent
.It Fl d
Turns on some debugging output.
.It Fl n
Turns off the printing of host names; instead, host IP addresses are given.
This may be useful if a nameserver is down.
.It Fl r Ar retries
Sets the number of retransmission attempts for each host (default = 5).
.It Fl t Ar timeout
Sets the retransmission timeout (in seconds) (default = 2).
.It Fl v
Prints verbose information about the NTP servers.
.El
.Sh AUTHORS
David L. Mills (mills@udel.edu)
.Sh BUGS
This program makes no attempt to improve accuracy by doing multiple samples.

View File

@ -1,131 +0,0 @@
#!/bin/sh
/usr/bin/awk '
#
# Based on a perl script by
# John Hay -- John.Hay@icomtek.csir.co.za / jhay@FreeBSD.org
#
# awk version by Frederick Bruckman <bruckman@ntp.org>
function usage() {
print "usage: ntptrace [-nv] [-r retries] [host]"
exit 1
}
function getargs( command, i, argc, argv, done) {
host = "localhost."
retries = 1
command = "getopt nr:v"
for (i = 2; i <= ARGC; i++)
command = command " " ARGV[i-1]
command | getline
argc = split($0, argv)
for (i = 1; i <= argc; i++) {
if (argv[i] == "-n") use_numeric = 1
if (argv[i] == "-v") do_verbose = 1
if (argv[i] == "-r") retries = argv[++i]
if (done == 1) host = argv[i]
if (argv[i] == "--") done = 1
}
if (retries != retries + 0)
usage()
}
function do_one_server( command, i, nvars, vars, stratum, peer, offset,
rootdelay, rootdispersion, refid, srcadr) {
rootdelay = 0
rootdispersion = 0
srcadr = ""
stratum = 255
command = "ntpq -n -c rv " host
while (command | getline) {
gsub(/,/,"")
nvars = split($0, vars)
for (i = 1; i <= nvars; i++) {
if (vars[i] ~ /stratum=/) {
stratum = vars[i]
sub(/stratum=/, "", stratum)
}
if (vars[i] ~ /peer=/) {
peer = vars[i]
sub(/peer=/, "", peer)
}
if (vars[i] ~ /offset=/) {
offset = vars[i]
sub(/offset=/, "", offset)
}
if (vars[i] ~ /phase=/) {
offset = vars[i]
sub(/phase=/, "", offset)
}
if (vars[i] ~ /rootdelay=/) {
rootdelay = vars[i]
sub(/rootdelay=/, "", rootdelay)
}
if (vars[i] ~ /rootdispersion=/) {
rootdispersion = vars[i]
sub(/rootdispersion=/, "", rootdispersion)
}
if (vars[i] ~ /refid=/) {
refid = vars[i]
sub(/refid=/, "", refid)
}
}
}
if (stratum == 255)
exit 1
offset = offset / 1000
syncdistance = (rootdispersion + (rootdelay / 2)) / 1000
printf("%s: stratum %d, offset %f, synch distance %f",
dhost(host), stratum, offset, syncdistance)
if (stratum == 1) printf(", refid '\''%s'\''", refid)
printf("\n")
if (stratum == 0 || stratum == 1 || stratum == 16)
exit 0
if (refid ~ /127\.127\.[0-9]{1,3}\.[0-9]{1,3}/)
exit 0
command = "ntpq -n -c '\''pstat " peer "'\'' " host
while (command | getline) {
gsub(/,/,"")
nvars = split($0, vars)
for (i = 1; i <= nvars; i++) {
if (vars[i] ~ /srcadr=/) {
srcadr = vars[i]
sub(/srcadr=/, "", srcadr)
}
}
}
if (srcadr ~ /127\.127\.[0-9]{1,3}\.[0-9]{1,3}/ || srcadr == "")
exit 0
host = srcadr
do_one_server()
}
function dhost(myhost, command) {
command = "host " myhost
while (command | getline) {
if (use_numeric) {
if (/address/) return $NF
} else {
if (/pointer/) return $NF
}
}
return myhost
}
BEGIN {
getargs()
do_one_server()
}
' $@

View File

@ -1,46 +0,0 @@
#!/bin/sh
PROG=${1-UNKNOWN}
ConfStr="$PROG"
ConfStr="$ConfStr 4.2.4p8"
case "$CSET" in
'') ;;
*) ConfStr="$ConfStr@$CSET" ;;
esac
case "-lcrypto" in
'') ;;
-lcrypto)
ConfStr="${ConfStr}-o" ;;
*) ConfStr="${ConfStr}-?" ;;
esac
ifile="`dirname $0`/../importdate"
if [ -f "$ifile" ]; then
ConfStr="$ConfStr "`cat "$ifile"`
else
ConfStr="$ConfStr `LC_TIME=C TZ= date`"
if [ ! -f .version ]; then
echo 0 > .version
fi
RUN="`cat .version`"
RUN="`expr $RUN + 1`"
echo $RUN > .version
ConfStr="$ConfStr (${RUN})"
fi
echo "Version <${ConfStr}>";
rm -f version.c
cat > version.c << -EoF-
/*
* version file for $PROG
*/
#include <config.h>
const char * Version = "${ConfStr}";
-EoF-