doc: convert manual from Texinfo to AsciiDoc
Split and convert the manual into four AsciiDoc documents, a document about installation and three documents in the manpage type for chrony.conf, chronyd and chronyc. The minimal man pages that were maintained separately from the manual are replaced by full man pages generated from AsciiDoc. Info files will no longer be provided. Some parts of the manual are rewritten, updated or trimmed. The introduction chapter is partially merged with README. The chapter about typical operating scenarios is included in the chrony.conf man page.
This commit is contained in:
parent
5828426977
commit
74afffed0c
12 changed files with 3584 additions and 5570 deletions
45
Makefile.in
45
Makefile.in
|
@ -24,9 +24,6 @@
|
|||
SYSCONFDIR=@SYSCONFDIR@
|
||||
BINDIR=@BINDIR@
|
||||
SBINDIR=@SBINDIR@
|
||||
MANDIR=@MANDIR@
|
||||
INFODIR=@INFODIR@
|
||||
DOCDIR=@DOCDIR@
|
||||
LOCALSTATEDIR=@LOCALSTATEDIR@
|
||||
CHRONYVARDIR=@CHRONYVARDIR@
|
||||
|
||||
|
@ -75,10 +72,10 @@ $(HASH_OBJ) : $(patsubst %.o,%.c,$(HASH_OBJ))
|
|||
distclean : clean
|
||||
-rm -f .DS_Store
|
||||
-rm -f Makefile
|
||||
-rm -f chrony.conf.5 chrony.texi chronyc.1 chronyd.8
|
||||
$(MAKE) -C doc distclean
|
||||
|
||||
clean :
|
||||
-rm -f *.o *.s chronyc chronyd core *~ chrony.info chrony.html chrony.txt
|
||||
-rm -f *.o *.s chronyc chronyd core *~
|
||||
-rm -rf .deps
|
||||
-rm -rf *.dSYM
|
||||
|
||||
|
@ -96,9 +93,6 @@ install: chronyd chronyc
|
|||
[ -d $(DESTDIR)$(SYSCONFDIR) ] || mkdir -p $(DESTDIR)$(SYSCONFDIR)
|
||||
[ -d $(DESTDIR)$(SBINDIR) ] || mkdir -p $(DESTDIR)$(SBINDIR)
|
||||
[ -d $(DESTDIR)$(BINDIR) ] || mkdir -p $(DESTDIR)$(BINDIR)
|
||||
[ -d $(DESTDIR)$(MANDIR)/man1 ] || mkdir -p $(DESTDIR)$(MANDIR)/man1
|
||||
[ -d $(DESTDIR)$(MANDIR)/man5 ] || mkdir -p $(DESTDIR)$(MANDIR)/man5
|
||||
[ -d $(DESTDIR)$(MANDIR)/man8 ] || mkdir -p $(DESTDIR)$(MANDIR)/man8
|
||||
[ -d $(DESTDIR)$(CHRONYVARDIR) ] || mkdir -p $(DESTDIR)$(CHRONYVARDIR)
|
||||
if [ -f $(DESTDIR)$(SBINDIR)/chronyd ]; then rm -f $(DESTDIR)$(SBINDIR)/chronyd ; fi
|
||||
if [ -f $(DESTDIR)$(BINDIR)/chronyc ]; then rm -f $(DESTDIR)$(BINDIR)/chronyc ; fi
|
||||
|
@ -106,12 +100,13 @@ install: chronyd chronyc
|
|||
chmod 755 $(DESTDIR)$(SBINDIR)/chronyd
|
||||
cp chronyc $(DESTDIR)$(BINDIR)/chronyc
|
||||
chmod 755 $(DESTDIR)$(BINDIR)/chronyc
|
||||
cp chronyc.1 $(DESTDIR)$(MANDIR)/man1
|
||||
chmod 644 $(DESTDIR)$(MANDIR)/man1/chronyc.1
|
||||
cp chronyd.8 $(DESTDIR)$(MANDIR)/man8
|
||||
chmod 644 $(DESTDIR)$(MANDIR)/man8/chronyd.8
|
||||
cp chrony.conf.5 $(DESTDIR)$(MANDIR)/man5
|
||||
chmod 644 $(DESTDIR)$(MANDIR)/man5/chrony.conf.5
|
||||
$(MAKE) -C doc install
|
||||
|
||||
docs :
|
||||
$(MAKE) -C doc docs
|
||||
|
||||
install-docs :
|
||||
$(MAKE) -C doc install-docs
|
||||
|
||||
%.o : %.c
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c $<
|
||||
|
@ -123,28 +118,6 @@ check : chronyd chronyc
|
|||
$(MAKE) -C test/unit check
|
||||
cd test/simulation && ./run
|
||||
|
||||
install-docs : docs
|
||||
[ -d $(DESTDIR)$(DOCDIR) ] || mkdir -p $(DESTDIR)$(DOCDIR)
|
||||
cp chrony.txt $(DESTDIR)$(DOCDIR)/chrony.txt
|
||||
chmod 644 $(DESTDIR)$(DOCDIR)/chrony.txt
|
||||
cp chrony.html $(DESTDIR)$(DOCDIR)/chrony.html
|
||||
chmod 644 $(DESTDIR)$(DOCDIR)/chrony.html
|
||||
[ -d $(DESTDIR)$(INFODIR) ] || mkdir -p $(DESTDIR)$(INFODIR)
|
||||
cp chrony.info* $(DESTDIR)$(INFODIR)
|
||||
chmod 644 $(DESTDIR)$(INFODIR)/chrony.info*
|
||||
|
||||
docs : chrony.txt chrony.html chrony.info
|
||||
|
||||
chrony.txt : chrony.texi
|
||||
makeinfo --no-headers --number-sections -o chrony.txt chrony.texi
|
||||
|
||||
chrony.html : chrony.texi
|
||||
command -v texi2html > /dev/null 2>&1 && texi2html chrony.texi || \
|
||||
makeinfo --no-split --html --number-sections -o chrony.html chrony.texi
|
||||
|
||||
chrony.info : chrony.texi
|
||||
makeinfo chrony.texi
|
||||
|
||||
Makefile : Makefile.in configure
|
||||
@echo
|
||||
@echo Makefile needs to be regenerated, run ./configure
|
||||
|
|
10
README
10
README
|
@ -84,6 +84,12 @@ chrony-dev-request@chrony.tuxfamily.org
|
|||
|
||||
as applicable.
|
||||
|
||||
When you are reporting a bug, please send us all the information you can.
|
||||
Unfortunately, chrony has proven to be one of those programs where it is very
|
||||
difficult to reproduce bugs in a different environment. So we may have to
|
||||
interact with you quite a lot to obtain enough extra logging and tracing to
|
||||
pin-point the problem in some cases. Please be patient and plan for this!
|
||||
|
||||
License
|
||||
=======
|
||||
|
||||
|
@ -105,6 +111,10 @@ Miroslav Lichvar <mlichvar@redhat.com>
|
|||
Acknowledgements
|
||||
================
|
||||
|
||||
In writing the chronyd program, extensive use has been made of RFC 1305
|
||||
and RFC 5905, written by David Mills. The source code of the NTP reference
|
||||
implementation has been used to check the details of the protocol.
|
||||
|
||||
The following people have provided patches and other major contributions
|
||||
to the program :
|
||||
|
||||
|
|
|
@ -1,67 +0,0 @@
|
|||
.TH chrony.conf 5 "@MAN_DATE@" "chrony @VERSION@" "Configuration Files"
|
||||
.SH NAME
|
||||
chrony.conf \- chronyd configuration file
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B @SYSCONFDIR@/chrony.conf
|
||||
|
||||
.SH DESCRIPTION
|
||||
\fIchrony\fR is a pair of programs for maintaining the accuracy of computer
|
||||
clocks. \fIchronyd\fR is a background daemon program that can be started at
|
||||
boot time.
|
||||
|
||||
Assuming that you have found some servers, you need to set up a
|
||||
configuration file to run \fIchrony\fR. The (compiled-in) default location
|
||||
for this file is \fB@SYSCONFDIR@/chrony.conf\fR. Assuming that your NTP
|
||||
servers are called `foo.example.net', `bar.example.net' and `baz.example.net',
|
||||
your \fBchrony.conf\fR file could contain as a minimum
|
||||
|
||||
.EX
|
||||
server foo.example.net
|
||||
server bar.example.net
|
||||
server baz.example.net
|
||||
.EE
|
||||
|
||||
However, you will probably want to include some of the other directives
|
||||
described in detail in the documentation supplied with the distribution
|
||||
(\fIchrony.txt\fR and \fIchrony.texi\fR). The following directives may be
|
||||
particularly useful : `driftfile', `makestep', `rtcsync'. Also, the `iburst'
|
||||
server option is useful to speed up the initial synchronization. The smallest
|
||||
useful configuration file would look something like
|
||||
|
||||
.EX
|
||||
server foo.example.net iburst
|
||||
server bar.example.net iburst
|
||||
server baz.example.net iburst
|
||||
driftfile @CHRONYVARDIR@/drift
|
||||
makestep 1.0 3
|
||||
rtcsync
|
||||
.EE
|
||||
|
||||
When using a pool of NTP servers (one name is used for multiple servers which
|
||||
may change over time), it's better to specify them with the `pool' directive
|
||||
instead of multiple `server' directives. The configuration file could in this
|
||||
case look like
|
||||
|
||||
.EX
|
||||
pool pool.ntp.org iburst
|
||||
driftfile @CHRONYVARDIR@/drift
|
||||
makestep 1.0 3
|
||||
rtcsync
|
||||
.EE
|
||||
|
||||
.SH "SEE ALSO"
|
||||
.BR chronyc(1),
|
||||
.BR chronyd(8)
|
||||
|
||||
.I http://chrony.tuxfamily.org/
|
||||
|
||||
.SH AUTHOR
|
||||
Richard Curnow <rc@rc0.org.uk>
|
||||
|
||||
This man-page was written by Jan Schaumann <jschauma@netmeister.org> as part of "The Missing
|
||||
Man Pages Project". Please see \fIhttp://www.netmeister.org/misc/m2p2/index.html\fR
|
||||
for details.
|
||||
|
||||
The complete chrony documentation is supplied in texinfo format.
|
||||
|
5216
chrony.texi.in
5216
chrony.texi.in
File diff suppressed because it is too large
Load diff
74
chronyc.1.in
74
chronyc.1.in
|
@ -1,74 +0,0 @@
|
|||
.TH CHRONYC 1 "@MAN_DATE@" "chrony @VERSION@" "User's Manual"
|
||||
.SH NAME
|
||||
chronyc \- command-line interface for chronyd
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B chronyc
|
||||
[\fIOPTIONS\fR]
|
||||
|
||||
.SH DESCRIPTION
|
||||
\fIchrony\fR is a pair of programs for maintaining the accuracy of computer
|
||||
clocks.
|
||||
|
||||
\fBchronyc\fR is a command-line interface program which can be used to
|
||||
monitor \fIchronyd\fR's performance and to change various operating
|
||||
parameters whilst it is running.
|
||||
|
||||
.SH USAGE
|
||||
A detailed description of all commands supported by \fBchronyc\fR is available
|
||||
via the documentation supplied with the distribution (\fIchrony.txt\fR and
|
||||
\fIchrony.texi\fR).
|
||||
|
||||
.SH OPTIONS
|
||||
A summary of the options supported by \fBchronyc\fR is included below.
|
||||
|
||||
.TP
|
||||
\fB\-h\fR \fIhostname\fR
|
||||
specify hostname or comma-separated list of addresses
|
||||
(default @CHRONYSOCKDIR@/chronyd.sock,127.0.0.1,::1)
|
||||
.TP
|
||||
\fB\-p\fR \fIport-number\fR
|
||||
specify port-number
|
||||
.TP
|
||||
\fB\-n\fR
|
||||
display raw IP addresses (don't attempt to look up hostnames)
|
||||
.TP
|
||||
\fB\-d\fR
|
||||
print debugging messages (if compiled with debugging support)
|
||||
.TP
|
||||
\fB\-4\fR
|
||||
resolve hostnames only to IPv4 addresses
|
||||
.TP
|
||||
\fB\-6\fR
|
||||
resolve hostnames only to IPv6 addresses
|
||||
.TP
|
||||
\fB\-m\fR
|
||||
allow multiple commands to be specified on the command line. Each argument
|
||||
will be interpreted as a whole command.
|
||||
.TP
|
||||
\fB\-f\fR \fIconf-file\fR
|
||||
this option is ignored and is provided only for compatibility.
|
||||
.TP
|
||||
\fB\-a\fR
|
||||
this option is ignored and is provided only for compatibility.
|
||||
.TP
|
||||
\fIcommand\fR
|
||||
specify command. If no command is given, chronyc will read commands
|
||||
interactively.
|
||||
|
||||
.SH BUGS
|
||||
To report bugs, please visit \fIhttp://chrony.tuxfamily.org\fR
|
||||
|
||||
.SH "SEE ALSO"
|
||||
.BR chronyd(8)
|
||||
|
||||
.I http://chrony.tuxfamily.org/
|
||||
|
||||
.SH AUTHOR
|
||||
Richard Curnow <rc@rc0.org.uk>
|
||||
|
||||
This man-page was written by Jan Schaumann <jschauma@netmeister.org> as part of "The Missing
|
||||
Man Pages Project". Please see \fIhttp://www.netmeister.org/misc/m2p2/index.html\fR
|
||||
for details.
|
||||
|
||||
The complete chrony documentation is supplied in texinfo format.
|
166
chronyd.8.in
166
chronyd.8.in
|
@ -1,166 +0,0 @@
|
|||
.TH CHRONYD 8 "@MAN_DATE@" "chrony @VERSION@" "System Administration"
|
||||
.SH NAME
|
||||
chronyd \- chrony background daemon
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B chronyd
|
||||
[\fIOPTIONS\fR] [\fIconfiguration commands\fR]
|
||||
|
||||
.SH DESCRIPTION
|
||||
\fIchrony\fR is a pair of programs for maintaining the accuracy of computer
|
||||
clocks. \fBchronyd\fR is a background daemon program that can be started at boot
|
||||
time.
|
||||
|
||||
\fBchronyd\fR is a daemon which runs in background on the
|
||||
system. It obtains measurements (e.g. via the network) of the
|
||||
system's offset relative to other systems, and adjusts the system
|
||||
time accordingly. For isolated systems, the user can periodically
|
||||
enter the correct time by hand (using \fIchronyc\fR). In either case,
|
||||
\fBchronyd\fR determines the rate at which the computer
|
||||
gains or loses time, and compensates for this.
|
||||
|
||||
.SH USAGE
|
||||
\fBchronyd\fR is usually started at boot-time and requires superuser
|
||||
privileges.
|
||||
|
||||
If \fBchronyd\fR has been installed to its default location
|
||||
\fI@SBINDIR@/chronyd\fR, starting it is simply a matter of entering the
|
||||
command:
|
||||
|
||||
\fI@SBINDIR@/chronyd\fR
|
||||
|
||||
Information messages and warnings will be logged to syslog.
|
||||
|
||||
If no configuration commands are specified on the command line,
|
||||
\fBchronyd\fR will read the commands from the configuration file
|
||||
(default \fI@SYSCONFDIR@/chrony.conf\fR).
|
||||
|
||||
.SH OPTIONS
|
||||
A summary of the options supported by \fBchronyd\fR is included below.
|
||||
|
||||
.TP
|
||||
\fB\-P\fR \fIpriority\fR
|
||||
On Linux, this option will select the SCHED_FIFO real-time scheduler at the
|
||||
specified priority (which must be between 0 and 100). On Mac OS X, this
|
||||
option must have either a value of 0 (the default) to disable the thread
|
||||
time constraint policy or 1 for the policy to be enabled. Other systems do not
|
||||
support this option.
|
||||
.TP
|
||||
.B \-m
|
||||
This option will lock chronyd into RAM so that it will never be paged out.
|
||||
This mode is only supported on Linux.
|
||||
.TP
|
||||
.B \-n
|
||||
When run in this mode, the program will not detach itself from the
|
||||
terminal.
|
||||
.TP
|
||||
.B \-d
|
||||
When run in this mode, the program will not detach itself from the
|
||||
terminal, and all messages will be sent to the terminal instead of
|
||||
to syslog. When \fBchronyd\fR was compiled with debugging support,
|
||||
this option can be used twice to print also debugging messages.
|
||||
.TP
|
||||
\fB\-f\fR \fIconf-file\fR
|
||||
This option can be used to specify an alternate location for the
|
||||
configuration file (default \fI@SYSCONFDIR@/chrony.conf\fR).
|
||||
.TP
|
||||
.B \-r
|
||||
This option will reload sample histories for each of the servers being used.
|
||||
These histories are created by using the \fIdump\fR command in \fIchronyc\fR,
|
||||
or by setting the \fIdumponexit\fR directive in the configuration file. This
|
||||
option is useful if you want to stop and restart \fBchronyd\fR briefly for any
|
||||
reason, e.g. to install a new version. However, it should be used only on
|
||||
systems where the kernel can maintain clock compensation whilst not under
|
||||
\fBchronyd\fR's control (i.e. Linux, FreeBSD, NetBSD and Solaris).
|
||||
.TP
|
||||
.B \-R
|
||||
When this option is used, the \fIinitstepslew\fR directive and the
|
||||
\fImakestep\fR directive used with a positive limit will be ignored. This
|
||||
option is useful when restarting \fBchronyd\fR and can be used in conjunction
|
||||
with the \fB-r\fR option.
|
||||
.TP
|
||||
.B \-s
|
||||
This option will set the system clock from the computer's real-time clock or
|
||||
to the last modification time of the file specified by the \fIdriftfile\fR
|
||||
directive. Real-time clocks are supported only on Linux.
|
||||
|
||||
If used in conjunction with the \fB-r\fR flag, \fBchronyd\fR will attempt
|
||||
to preserve the old samples after setting the system clock from
|
||||
the real time clock (RTC). This can be used to allow \fBchronyd\fR to
|
||||
perform long term averaging of the gain or loss rate across system
|
||||
reboots, and is useful for dial-up systems that are shut down when
|
||||
not in use. For this to work well, it relies on \fBchronyd\fR having
|
||||
been able to determine accurate statistics for the difference
|
||||
between the RTC and system clock last time the computer was on.
|
||||
|
||||
If the last modification time of the drift file is later than the current time
|
||||
and the RTC time, the system time will be set to it to restore the time when
|
||||
\fBchronyd\fR was previously stopped. This is useful on computers that have no
|
||||
RTC or the RTC is broken (e.g. it has no battery).
|
||||
.TP
|
||||
\fB\-u\fR \fIuser\fR
|
||||
This option sets the name of the system user to which \fBchronyd\fR will switch
|
||||
after start in order to drop root privileges. It overrides the \fBuser\fR
|
||||
directive from the configuration file (default \fB@DEFAULT_USER@\fR).
|
||||
|
||||
On Linux, \fBchronyd\fR needs to be compiled with support for the \fBlibcap\fR
|
||||
library. On Mac OS X, FreeBSD, NetBSD and Solaris \fBchronyd\fR forks into two
|
||||
processes. The child process retains root privileges, but can only perform a
|
||||
very limited range of privileged system calls on behalf of the parent.
|
||||
.TP
|
||||
\fB\-F\fR \fIlevel\fR
|
||||
This option configures a system call filter when \fBchronyd\fR is compiled with
|
||||
support for the Linux secure computing (seccomp) facility. In level 1 the
|
||||
process is killed when a forbidden system call is made, in level -1 the SYSSIG
|
||||
signal is thrown instead and in level 0 the filter is disabled (default 0).
|
||||
|
||||
It's recommended to enable the filter only when it's known to work on the
|
||||
version of the system where \fBchrony\fR is installed as the filter needs to
|
||||
allow also system calls made from libraries that \fBchronyd\fR is using (e.g.
|
||||
libc) and different versions or implementations of the libraries may make
|
||||
different system calls. If the filter is missing some system call,
|
||||
\fBchronyd\fR could be killed even in normal operation.
|
||||
.TP
|
||||
.B \-q
|
||||
When run in this mode, chronyd will set the system clock once
|
||||
and exit. It will not detach from the terminal.
|
||||
.TP
|
||||
.B \-Q
|
||||
This option is similar to \fB\-q\fR, but it will only print the offset and
|
||||
not correct the clock.
|
||||
.TP
|
||||
.B \-v
|
||||
This option displays \fBchronyd\fR's version number to the terminal and exits
|
||||
.TP
|
||||
.B \-4
|
||||
Resolve hostnames only to IPv4 addresses and create only IPv4 sockets.
|
||||
.TP
|
||||
.B \-6
|
||||
Resolve hostnames only to IPv6 addresses and create only IPv6 sockets.
|
||||
|
||||
.SH FILES
|
||||
\fI@SYSCONFDIR@/chrony.conf\fR
|
||||
|
||||
.SH BUGS
|
||||
To report bugs, please visit \fIhttp://chrony.tuxfamily.org/\fR
|
||||
|
||||
.SH "SEE ALSO"
|
||||
\fBchronyd\fR is documented in detail in the documentation supplied with the
|
||||
distribution (\fIchrony.txt\fR and \fIchrony.texi\fR).
|
||||
|
||||
.BR chronyc(1),
|
||||
.BR chrony.conf(5),
|
||||
.BR hwclock(8),
|
||||
.BR ntpd(8)
|
||||
|
||||
.I http://chrony.tuxfamily.org/
|
||||
|
||||
.SH AUTHOR
|
||||
Richard Curnow <rc@rc0.org.uk>
|
||||
|
||||
This man-page was written by Jan Schaumann <jschauma@netmeister.org> as part
|
||||
of "The Missing Man Pages Project". Please see
|
||||
\fIhttp://www.netmeister.org/misc/m2p2/index.html\fR for details.
|
||||
|
||||
The complete chrony documentation is supplied in texinfo format.
|
||||
|
12
configure
vendored
12
configure
vendored
|
@ -111,7 +111,6 @@ Fine tuning of the installation directories:
|
|||
--bindir=DIR user executables [EPREFIX/bin]
|
||||
--sbindir=DIR system admin executables [EPREFIX/sbin]
|
||||
--datarootdir=DIR data root [PREFIX/share]
|
||||
--infodir=DIR info documentation [DATAROOTDIR/info]
|
||||
--mandir=DIR man documentation [DATAROOTDIR/man]
|
||||
--docdir=DIR documentation root [DATAROOTDIR/doc/chrony]
|
||||
--localstatedir=DIR modifiable single-machine data [/var]
|
||||
|
@ -261,9 +260,6 @@ do
|
|||
--datarootdir=* )
|
||||
SETDATAROOTDIR=`echo $option | sed -e 's/^.*=//;'`
|
||||
;;
|
||||
--infodir=* )
|
||||
SETINFODIR=`echo $option | sed -e 's/^.*=//;'`
|
||||
;;
|
||||
--mandir=* )
|
||||
SETMANDIR=`echo $option | sed -e 's/^.*=//;'`
|
||||
;;
|
||||
|
@ -797,11 +793,6 @@ if [ "x$SETDATAROOTDIR" != "x" ]; then
|
|||
DATAROOTDIR=$SETDATAROOTDIR
|
||||
fi
|
||||
|
||||
INFODIR=${DATAROOTDIR}/info
|
||||
if [ "x$SETINFODIR" != "x" ]; then
|
||||
INFODIR=$SETINFODIR
|
||||
fi
|
||||
|
||||
MANDIR=${DATAROOTDIR}/man
|
||||
if [ "x$SETMANDIR" != "x" ]; then
|
||||
MANDIR=$SETMANDIR
|
||||
|
@ -848,7 +839,7 @@ fi
|
|||
|
||||
add_def CHRONY_VERSION "\"${CHRONY_VERSION}\""
|
||||
|
||||
for f in Makefile test/unit/Makefile chrony.conf.5 chrony.texi chronyc.1 chronyd.8
|
||||
for f in Makefile doc/Makefile test/unit/Makefile
|
||||
do
|
||||
echo Creating $f
|
||||
sed -e "s%@EXTRA_OBJECTS@%${EXTRA_OBJECTS}%;\
|
||||
|
@ -867,7 +858,6 @@ do
|
|||
s%@SBINDIR@%${SBINDIR}%;\
|
||||
s%@DOCDIR@%${DOCDIR}%;\
|
||||
s%@MANDIR@%${MANDIR}%;\
|
||||
s%@INFODIR@%${INFODIR}%;\
|
||||
s%@LOCALSTATEDIR@%${LOCALSTATEDIR}%;\
|
||||
s%@CHRONYSOCKDIR@%${CHRONYSOCKDIR}%;\
|
||||
s%@CHRONYVARDIR@%${CHRONYVARDIR}%;\
|
||||
|
|
70
doc/Makefile.in
Normal file
70
doc/Makefile.in
Normal file
|
@ -0,0 +1,70 @@
|
|||
ADOC = asciidoctor
|
||||
ADOC_FLAGS =
|
||||
SED = sed
|
||||
HTML_TO_TXT = w3m -dump -T text/html
|
||||
|
||||
MAN_FILES = chrony.conf.man chronyc.man chronyd.man
|
||||
TXT_FILES = faq.txt installation.txt
|
||||
HTML_FILES = $(MAN_FILES:%.man=%.html) $(TXT_FILES:%.txt=%.html)
|
||||
MAN_IN_FILES = $(MAN_FILES:%.man=%.man.in)
|
||||
|
||||
SYSCONFDIR = @SYSCONFDIR@
|
||||
BINDIR = @BINDIR@
|
||||
SBINDIR = @SBINDIR@
|
||||
MANDIR = @MANDIR@
|
||||
DOCDIR = @DOCDIR@
|
||||
CHRONYSOCKDIR = @CHRONYSOCKDIR@
|
||||
CHRONYVARDIR = @CHRONYVARDIR@
|
||||
CHRONY_VERSION = @CHRONY_VERSION@
|
||||
DEFAULT_USER = @DEFAULT_USER@
|
||||
DEFAULT_HWCLOCK_FILE = @DEFAULT_HWCLOCK_FILE@
|
||||
|
||||
SED_COMMANDS = "s%\@SYSCONFDIR\@%$(SYSCONFDIR)%g;\
|
||||
s%\@BINDIR\@%$(BINDIR)%g;\
|
||||
s%\@SBINDIR\@%$(SBINDIR)%g;\
|
||||
s%\@CHRONY_VERSION\@%$(CHRONY_VERSION)%g;\
|
||||
s%\@DEFAULT_HWCLOCK_FILE\@%$(DEFAULT_HWCLOCK_FILE)%g;\
|
||||
s%\@DEFAULT_USER\@%$(DEFAULT_USER)%g;\
|
||||
s%\@CHRONYSOCKDIR\@%$(CHRONYSOCKDIR)%g;\
|
||||
s%\@CHRONYVARDIR\@%$(CHRONYVARDIR)%g;"
|
||||
|
||||
man: $(MAN_FILES) $(MAN_IN_FILES)
|
||||
html: $(HTML_FILES)
|
||||
txt: $(TXT_FILES)
|
||||
docs: man html
|
||||
|
||||
%.html: %.adoc
|
||||
$(ADOC) $(ADOC_FLAGS) -b html -o - $< | $(SED) -e $(SED_COMMANDS) > $@
|
||||
|
||||
%.man.in: %.adoc
|
||||
$(ADOC) $(ADOC_FLAGS) -b manpage -o $@ $<
|
||||
|
||||
%.man: %.man.in
|
||||
$(SED) -e $(SED_COMMANDS) < $< > $@
|
||||
|
||||
%.txt: %.html
|
||||
$(HTML_TO_TXT) < $< > $@
|
||||
|
||||
install: $(MAN_FILES)
|
||||
[ -d $(DESTDIR)$(MANDIR)/man1 ] || mkdir -p $(DESTDIR)$(MANDIR)/man1
|
||||
[ -d $(DESTDIR)$(MANDIR)/man5 ] || mkdir -p $(DESTDIR)$(MANDIR)/man5
|
||||
[ -d $(DESTDIR)$(MANDIR)/man8 ] || mkdir -p $(DESTDIR)$(MANDIR)/man8
|
||||
cp chronyc.man $(DESTDIR)$(MANDIR)/man1/chronyc.1
|
||||
chmod 644 $(DESTDIR)$(MANDIR)/man1/chronyc.1
|
||||
cp chronyd.man $(DESTDIR)$(MANDIR)/man8/chronyd.8
|
||||
chmod 644 $(DESTDIR)$(MANDIR)/man8/chronyd.8
|
||||
cp chrony.conf.man $(DESTDIR)$(MANDIR)/man5/chrony.conf.5
|
||||
chmod 644 $(DESTDIR)$(MANDIR)/man5/chrony.conf.5
|
||||
|
||||
install-docs: $(HTML_FILES)
|
||||
[ -d $(DESTDIR)$(DOCDIR) ] || mkdir -p $(DESTDIR)$(DOCDIR)
|
||||
for f in $(HTML_FILES); do \
|
||||
cp $$f $(DESTDIR)$(DOCDIR); \
|
||||
chmod 644 $(DESTDIR)$(DOCDIR)/$$f; \
|
||||
done
|
||||
|
||||
clean: distclean
|
||||
rm -f $(MAN_IN_FILES)
|
||||
|
||||
distclean:
|
||||
rm -f $(MAN_FILES) $(TXT_FILES) $(HTML_FILES)
|
2020
doc/chrony.conf.adoc
Normal file
2020
doc/chrony.conf.adoc
Normal file
File diff suppressed because it is too large
Load diff
1121
doc/chronyc.adoc
Normal file
1121
doc/chronyc.adoc
Normal file
File diff suppressed because it is too large
Load diff
164
doc/chronyd.adoc
Normal file
164
doc/chronyd.adoc
Normal file
|
@ -0,0 +1,164 @@
|
|||
// This file is part of chrony
|
||||
//
|
||||
// Copyright (C) Richard P. Curnow 1997-2003
|
||||
// Copyright (C) Miroslav Lichvar 2009-2016
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of version 2 of the GNU General Public License as
|
||||
// published by the Free Software Foundation.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful, but
|
||||
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
= chronyd(8)
|
||||
:doctype: manpage
|
||||
:man manual: System Administration
|
||||
:man source: chrony @CHRONY_VERSION@
|
||||
|
||||
== NAME
|
||||
|
||||
chronyd - chrony daemon
|
||||
|
||||
== SYNOPSIS
|
||||
|
||||
*chronyd* [_OPTION_]... [_DIRECTIVE_]...
|
||||
|
||||
== DESCRIPTION
|
||||
|
||||
*chronyd* is a daemon for synchronisation of the system clock. It can
|
||||
synchronise the clock with NTP servers, reference clocks (e.g. a GPS receiver),
|
||||
and manual input using wristwatch and keyboard via *chronyc*. It can also
|
||||
operate as an NTPv4 (RFC 5905) server and peer to provide a time service to
|
||||
other computers in the network.
|
||||
|
||||
If no configuration directives are specified on the command line, *chronyd*
|
||||
will read them from a configuration file. The compiled-in default location of
|
||||
the file is _@SYSCONFDIR@/chrony.conf_.
|
||||
|
||||
Information messages and warnings will be logged to syslog.
|
||||
|
||||
== OPTIONS
|
||||
|
||||
*-4*::
|
||||
With this option hostnames will be resolved only to IPv4 addresses and only
|
||||
IPv4 sockets will be created.
|
||||
|
||||
*-6*::
|
||||
With this option hostnames will be resolved only to IPv6 addresses and only
|
||||
IPv6 sockets will be created.
|
||||
|
||||
*-f* _file_::
|
||||
This option can be used to specify an alternate location for the configuration
|
||||
file (default _@SYSCONFDIR@/chrony.conf_).
|
||||
|
||||
*-n*::
|
||||
When run in this mode, the program will not detach itself from the terminal.
|
||||
|
||||
*-d*::
|
||||
When run in this mode, the program will not detach itself from the terminal,
|
||||
and all messages will be sent to the terminal instead of to syslog. When
|
||||
*chronyd* was compiled with debugging support, this option can be used twice to
|
||||
print also debugging messages.
|
||||
|
||||
*-q*::
|
||||
When run in this mode, *chronyd* will set the system clock once and exit. It
|
||||
will not detach from the terminal.
|
||||
|
||||
*-Q*::
|
||||
This option is similar to *-q*, but it will only print the offset without any
|
||||
corrections of the clock.
|
||||
|
||||
*-r*::
|
||||
This option will reload sample histories for each of the servers and refclocks
|
||||
being used. These histories are created by using the
|
||||
<<chronyc.adoc#dump,*dump*>> command in *chronyc*, or by setting the
|
||||
<<chrony.conf.adoc#dumponexit,*dumponexit*>> directive in the configuration
|
||||
file. This option is useful if you want to stop and restart *chronyd* briefly
|
||||
for any reason, e.g. to install a new version. However, it should be used only
|
||||
on systems where the kernel can maintain clock compensation whilst not under
|
||||
*chronyd*'s control (i.e. Linux, FreeBSD, NetBSD and Solaris).
|
||||
|
||||
*-R*::
|
||||
When this option is used, the <<chrony.conf.adoc#initstepslew,*initstepslew*>>
|
||||
directive and the <<chrony.conf.adoc#makestep,*makestep*>> directive used with
|
||||
a positive limit will be ignored. This option is useful when restarting
|
||||
*chronyd* and can be used in conjunction with the *-r* option.
|
||||
|
||||
*-s*::
|
||||
This option will set the system clock from the computer's real-time clock (RTC)
|
||||
or to the last modification time of the file specified by the
|
||||
<<chrony.conf.adoc#driftfile,*driftfile*>> directive. Real-time clocks are
|
||||
supported only on Linux.
|
||||
+
|
||||
If used in conjunction with the *-r* flag, *chronyd* will attempt to preserve
|
||||
the old samples after setting the system clock from the RTC. This can be used
|
||||
to allow *chronyd* to perform long term averaging of the gain or loss rate
|
||||
across system reboots, and is useful for systems with intermittent access to
|
||||
network that are shut down when not in use. For this to work well, it relies
|
||||
on *chronyd* having been able to determine accurate statistics for the
|
||||
difference between the RTC and system clock last time the computer was on.
|
||||
+
|
||||
If the last modification time of the drift file is later than both the current
|
||||
time and the RTC time, the system time will be set to it to restore the time
|
||||
when *chronyd* was previously stopped. This is useful on computers that have no
|
||||
RTC or the RTC is broken (e.g. it has no battery).
|
||||
|
||||
*-u* _user_::
|
||||
This option sets the name of the system user to which *chronyd* will switch
|
||||
after start in order to drop root privileges. It overrides the
|
||||
<<chrony.conf.adoc#user,*user*>> directive (default _@DEFAULT_USER@_).
|
||||
+
|
||||
On Linux, *chronyd* needs to be compiled with support for the *libcap* library.
|
||||
On Mac OS X, FreeBSD, NetBSD and Solaris *chronyd* forks into two processes.
|
||||
The child process retains root privileges, but can only perform a very limited
|
||||
range of privileged system calls on behalf of the parent.
|
||||
|
||||
*-F* _level_::
|
||||
This option configures a system call filter when *chronyd* is compiled with
|
||||
support for the Linux secure computing (seccomp) facility. In level 1 the
|
||||
process is killed when a forbidden system call is made, in level -1 the SYSSIG
|
||||
signal is thrown instead and in level 0 the filter is disabled (default 0).
|
||||
+
|
||||
It's recommended to enable the filter only when it's known to work on the
|
||||
version of the system where *chrony* is installed as the filter needs to allow
|
||||
also system calls made from libraries that *chronyd* is using (e.g. libc) and
|
||||
different versions or implementations of the libraries may make different
|
||||
system calls. If the filter is missing some system call, *chronyd* could be
|
||||
killed even in normal operation.
|
||||
|
||||
*-P* _priority_::
|
||||
On Linux, this option will select the SCHED_FIFO real-time scheduler at the
|
||||
specified priority (which must be between 0 and 100). On Mac OS X, this option
|
||||
must have either a value of 0 (the default) to disable the thread time
|
||||
constraint policy or 1 for the policy to be enabled. Other systems do not
|
||||
support this option.
|
||||
|
||||
*-m*::
|
||||
This option will lock *chronyd* into RAM so that it will never be paged out.
|
||||
This mode is only supported on Linux.
|
||||
|
||||
*-v*::
|
||||
With this option *chronyd* will print version number to the terminal and exit.
|
||||
|
||||
== FILES
|
||||
|
||||
_@SYSCONFDIR@/chrony.conf_
|
||||
|
||||
== SEE ALSO
|
||||
|
||||
<<chronyc.adoc#,*chronyc(1)*>>, <<chrony.conf.adoc#,*chrony.conf(5)*>>
|
||||
|
||||
== BUGS
|
||||
|
||||
For instructions on how to report bugs, please visit
|
||||
http://chrony.tuxfamily.org/.
|
||||
|
||||
== AUTHORS
|
||||
|
||||
chrony was written by Richard Curnow, Miroslav Lichvar and others.
|
189
doc/installation.adoc
Normal file
189
doc/installation.adoc
Normal file
|
@ -0,0 +1,189 @@
|
|||
// This file is part of chrony
|
||||
//
|
||||
// Copyright (C) Richard P. Curnow 1997-2003
|
||||
// Copyright (C) Miroslav Lichvar 2009-2016
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of version 2 of the GNU General Public License as
|
||||
// published by the Free Software Foundation.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful, but
|
||||
// WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
= Installation
|
||||
|
||||
The software is distributed as source code which has to be compiled. The source
|
||||
code is supplied in the form of a gzipped tar file, which unpacks to a
|
||||
subdirectory identifying the name and version of the program.
|
||||
|
||||
After unpacking the source code, change directory into it, and type
|
||||
|
||||
----
|
||||
./configure
|
||||
----
|
||||
|
||||
This is a shell script that automatically determines the system type. There is
|
||||
a single optional parameter, `--prefix` which indicates the directory tree
|
||||
where the software should be installed. For example,
|
||||
|
||||
----
|
||||
./configure --prefix=/opt/free
|
||||
----
|
||||
|
||||
will install the `chronyd` daemon into `/opt/free/sbin` and the `chronyc`
|
||||
control program into `/opt/free/bin`. The default value for the prefix is
|
||||
`/usr/local`.
|
||||
|
||||
The configure script assumes you want to use gcc as your compiler. If you want
|
||||
to use a different compiler, you can configure this way:
|
||||
|
||||
----
|
||||
CC=cc CFLAGS=-O ./configure --prefix=/opt/free
|
||||
----
|
||||
|
||||
for Bourne-family shells, or
|
||||
|
||||
----
|
||||
setenv CC cc
|
||||
setenv CFLAGS -O
|
||||
./configure --prefix=/opt/free
|
||||
----
|
||||
|
||||
for C-family shells.
|
||||
|
||||
If the software cannot (yet) be built on your system, an error message will be
|
||||
shown. Otherwise, `Makefile` will be generated.
|
||||
|
||||
On Linux, if development files for the libcap library are available, `chronyd`
|
||||
will be built with support for dropping root privileges. On other systems no
|
||||
extra library is needed. The default user which `chronyd` should run as can be
|
||||
specified with the `--with-user` option of the configure script.
|
||||
|
||||
If development files for the editline or readline library are available,
|
||||
`chronyc` will be built with line editing support. If you don't want this,
|
||||
specify the `--disable-readline` flag to configure.
|
||||
|
||||
If a `timepps.h` header is available (e.g. from the
|
||||
http://linuxpps.org[LinuxPPS project]), `chronyd` will be built with PPS API
|
||||
reference clock driver. If the header is installed in a location that isn't
|
||||
normally searched by the compiler, you can add it to the searched locations by
|
||||
setting the `CPPFLAGS` variable to `-I/path/to/timepps`.
|
||||
|
||||
Now type
|
||||
|
||||
----
|
||||
make
|
||||
----
|
||||
|
||||
to build the programs.
|
||||
|
||||
If you want to build the manual in HTML, type
|
||||
|
||||
----
|
||||
make docs
|
||||
----
|
||||
|
||||
Once the programs have been successfully compiled, they need to be installed in
|
||||
their target locations. This step normally needs to be performed by the
|
||||
superuser, and requires the following command to be entered.
|
||||
|
||||
----
|
||||
make install
|
||||
----
|
||||
|
||||
This will install the binaries and man pages.
|
||||
|
||||
To install the HTML version of the manual, enter the command
|
||||
|
||||
----
|
||||
make install-docs
|
||||
----
|
||||
|
||||
Now that the software is successfully installed, the next step is to set up a
|
||||
configuration file. The default location of the file is _/etc/chrony.conf_.
|
||||
Several examples of configuration with comments are included in the examples
|
||||
directory. Suppose you want to use public NTP servers from the pool.ntp.org
|
||||
project as your time reference. A minimal useful configuration file could be
|
||||
|
||||
----
|
||||
pool pool.ntp.org iburst
|
||||
makestep 1.0 3
|
||||
rtcsync
|
||||
----
|
||||
|
||||
Then, `chronyd` can be run. For security reasons, it's recommended to create an
|
||||
unprivileged user for `chronyd` and specify it with the `-u` command-line
|
||||
option or the `user` directive in the configuration file, or set the default
|
||||
user with the `--with-user` configure option before building.
|
||||
|
||||
== Support for line editing libraries
|
||||
|
||||
`chronyc` can be built with support for line editing, this allows you to use
|
||||
the cursor keys to replay and edit old commands. Two libraries are supported
|
||||
which provide such functionality, editline and GNU readline.
|
||||
|
||||
Please note that readline since version 6.0 is licensed under GPLv3+ which is
|
||||
incompatible with chrony's license GPLv2. You should use editline instead if
|
||||
you don't want to use older readline versions.
|
||||
|
||||
The configure script will automatically enable the line editing support if one
|
||||
of the supported libraries is available. If they are both available, the
|
||||
editline library will be used.
|
||||
|
||||
If you don't want to use it (in which case chronyc will use a minimal command
|
||||
line interface), invoke configure like this:
|
||||
|
||||
----
|
||||
./configure --disable-readline other-options...
|
||||
----
|
||||
|
||||
If you have editline, readline or ncurses installed in locations that aren't
|
||||
normally searched by the compiler and linker, you need to use extra options:
|
||||
|
||||
`--with-readline-includes=directory_name`::
|
||||
This defines the name of the directory above the one where `readline.h` is.
|
||||
`readline.h` is assumed to be in `editline` or `readline` subdirectory of the
|
||||
named directory.
|
||||
|
||||
`--with-readline-library=directory_name`::
|
||||
This defines the directory containing the `libedit.a` or `libedit.so` file,
|
||||
or `libreadline.a` or `libreadline.so` file.
|
||||
|
||||
`--with-ncurses-library=directory_name`::
|
||||
This defines the directory containing the `libncurses.a` or `libncurses.so`
|
||||
file.
|
||||
|
||||
== Extra options for package builders
|
||||
|
||||
The configure and make procedures have some extra options that may be useful if
|
||||
you are building a distribution package for chrony.
|
||||
|
||||
The `--mandir=DIR` option to configure specifies an install directory for the
|
||||
man pages. This overrides the `man` subdirectory of the argument to the
|
||||
--prefix option.
|
||||
|
||||
----
|
||||
./configure --prefix=/usr --mandir=/usr/share/man
|
||||
----
|
||||
|
||||
to set both options together.
|
||||
|
||||
The final option is the `DESTDIR` option to the make command. For example, you
|
||||
could use the commands
|
||||
|
||||
----
|
||||
./configure --prefix=/usr --mandir=/usr/share/man
|
||||
make all docs
|
||||
make install DESTDIR=./tmp
|
||||
cd tmp
|
||||
tar cvf - . | gzip -9 > chrony.tar.gz
|
||||
----
|
||||
|
||||
to build a package. When untarred within the root directory, this will install
|
||||
the files to the intended final locations.
|
Loading…
Reference in a new issue